Merge pull request #204 from hapifhir/kbd-20201125-cql-initial-impl
Kbd 20201125 cql initial impl
This commit is contained in:
@@ -316,6 +316,10 @@ The server may be configured with subscription support by enabling properties in
|
||||
|
||||
- `hapi.fhir.subscription.websocket.enabled` - Enables websocket subscriptions. With this enabled, your server will accept incoming websocket connections on the following URL (this example uses the default context path and port, you may need to tweak depending on your deployment environment): [ws://localhost:8080/websocket](ws://localhost:8080/websocket)
|
||||
|
||||
## Enabling CQL
|
||||
|
||||
Set `hapi.fhir.cql_enabled=true` in the [application.yaml](https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/src/main/resources/application.yaml) file to enable [Clinical Quality Language](https://cql.hl7.org/) on this server.
|
||||
|
||||
## Enabling MDM (EMPI)
|
||||
|
||||
Set `hapi.fhir.mdm_enabled=true` in the [application.yaml](https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/src/main/resources/application.yaml) file to enable MDM on this server. The MDM matching rules are configured in [mdm-rules.json](https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/src/main/resources/mdm-rules.json). The rules in this example file should be replaced with actual matching rules appropriate to your data. Note that MDM relies on subscriptions, so for MDM to work, subscriptions must be enabled.
|
||||
|
||||
10
pom.xml
10
pom.xml
@@ -14,6 +14,7 @@
|
||||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<!-- FIMXME KBD Change this to 5.3.0 BEFORE merging this code to master ! -->
|
||||
<version>5.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
@@ -99,6 +100,12 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- This dependency includes the JPA CQL Server -->
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-jpaserver-cql</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<!-- This dependency includes the JPA MDM Server -->
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
@@ -279,7 +286,6 @@
|
||||
<version>${spring_boot_version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
@@ -399,7 +405,7 @@
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<failBuildInCaseOfConflict>true</failBuildInCaseOfConflict>
|
||||
<failBuildInCaseOfConflict>false</failBuildInCaseOfConflict>
|
||||
<checkTestClasspath>false</checkTestClasspath>
|
||||
<!--
|
||||
<printEqualFiles>false</printEqualFiles>
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.r4.model.Bundle;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.jpa.api.config.DaoConfig.ClientIdStrategyEnum;
|
||||
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
|
||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.hl7.fhir.r4.model.Bundle;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@ConfigurationProperties(prefix = "hapi.fhir")
|
||||
@Configuration
|
||||
@EnableConfigurationProperties
|
||||
public class AppProperties {
|
||||
|
||||
private Boolean cql_enabled = false;
|
||||
private Boolean mdm_enabled = false;
|
||||
private Boolean allow_cascading_deletes = false;
|
||||
private Boolean allow_contains_searches = true;
|
||||
@@ -31,7 +29,7 @@ public class AppProperties {
|
||||
private Boolean allow_multiple_delete = false;
|
||||
private Boolean allow_override_default_search_params = true;
|
||||
private Boolean allow_placeholder_references = true;
|
||||
private Boolean auto_create_placeholder_reference_targets = true;
|
||||
private Boolean auto_create_placeholder_reference_targets = false;
|
||||
private Boolean enable_index_missing_fields = false;
|
||||
private Boolean enable_repository_validating_interceptor = false;
|
||||
private Boolean enforce_referential_integrity_on_delete = true;
|
||||
@@ -59,7 +57,7 @@ public class AppProperties {
|
||||
private Boolean narrative_enabled = true;
|
||||
|
||||
private Validation validation = new Validation();
|
||||
private Map<String, Tester> tester = ImmutableMap.of("home", new Tester());
|
||||
private Map<String, Tester> tester = null;
|
||||
private Logger logger = new Logger();
|
||||
private Subscription subscription = new Subscription();
|
||||
private Cors cors = null;
|
||||
@@ -93,6 +91,14 @@ public class AppProperties {
|
||||
this.partitioning = partitioning;
|
||||
}
|
||||
|
||||
public Boolean getCql_enabled() {
|
||||
return cql_enabled;
|
||||
}
|
||||
|
||||
public void setCql_enabled(Boolean cql_enabled) {
|
||||
this.cql_enabled = cql_enabled;
|
||||
}
|
||||
|
||||
public Boolean getMdm_enabled() {
|
||||
return mdm_enabled;
|
||||
}
|
||||
@@ -101,7 +107,6 @@ public class AppProperties {
|
||||
this.mdm_enabled = mdm_enabled;
|
||||
}
|
||||
|
||||
|
||||
public Cors getCors() {
|
||||
return cors;
|
||||
}
|
||||
@@ -376,7 +381,11 @@ public class AppProperties {
|
||||
}
|
||||
|
||||
public void setReuse_cached_search_results_millis(Long reuse_cached_search_results_millis) {
|
||||
this.reuse_cached_search_results_millis = reuse_cached_search_results_millis;
|
||||
if (Objects.equals(reuse_cached_search_results_millis, 0L)) {
|
||||
this.reuse_cached_search_results_millis = null;
|
||||
} else {
|
||||
this.reuse_cached_search_results_millis = reuse_cached_search_results_millis;
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, Tester> getTester() {
|
||||
@@ -480,8 +489,8 @@ public static class Cors {
|
||||
|
||||
public static class Tester {
|
||||
|
||||
private String name = "Local Tester";
|
||||
private String server_address = "http://localhost:8080/fhir";
|
||||
private String name;
|
||||
private String server_address;
|
||||
private Boolean refuse_to_fetch_third_party_urls = true;
|
||||
private FhirVersionEnum fhir_version = FhirVersionEnum.R4;
|
||||
|
||||
@@ -574,7 +583,7 @@ public static class Cors {
|
||||
public static class Partitioning {
|
||||
|
||||
private Boolean partitioning_include_in_search_hashes = false;
|
||||
|
||||
private Boolean allow_references_across_partitions = false;
|
||||
|
||||
public Boolean getPartitioning_include_in_search_hashes() {
|
||||
return partitioning_include_in_search_hashes;
|
||||
@@ -583,6 +592,13 @@ public static class Cors {
|
||||
public void setPartitioning_include_in_search_hashes(Boolean partitioning_include_in_search_hashes) {
|
||||
this.partitioning_include_in_search_hashes = partitioning_include_in_search_hashes;
|
||||
}
|
||||
public Boolean getAllow_references_across_partitions() {
|
||||
return allow_references_across_partitions;
|
||||
}
|
||||
|
||||
public void setAllow_references_across_partitions(Boolean allow_references_across_partitions) {
|
||||
this.allow_references_across_partitions = allow_references_across_partitions;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Subscription {
|
||||
|
||||
@@ -32,8 +32,8 @@ public class Application extends SpringBootServletInitializer {
|
||||
System.setProperty("spring.batch.job.enabled", "false");
|
||||
SpringApplication.run(Application.class, args);
|
||||
|
||||
//Server is now accessible at eg. http://localhost:8080/hapi-fhir-jpaserver/fhir/metadata
|
||||
//UI is now accessible at http://localhost:8080/hapi-fhir-jpaserver/
|
||||
//Server is now accessible at eg. http://localhost:8080/fhir/metadata
|
||||
//UI is now accessible at http://localhost:8080/
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.cql.common.provider.CqlProviderLoader;
|
||||
import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster;
|
||||
import ca.uhn.fhir.interceptor.api.IInterceptorService;
|
||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||
@@ -100,8 +101,10 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
@Autowired(required = false)
|
||||
IRepositoryValidationInterceptorFactory factory;
|
||||
|
||||
public BaseJpaRestfulServer() {
|
||||
// These are set only if the features are enabled
|
||||
private CqlProviderLoader cqlProviderLoader;
|
||||
|
||||
public BaseJpaRestfulServer() {
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -124,10 +127,10 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
}
|
||||
|
||||
setFhirContext(fhirSystemDao.getContext());
|
||||
|
||||
registerProviders(resourceProviders.createProviders());
|
||||
registerProvider(jpaSystemProvider);
|
||||
|
||||
FhirVersionEnum fhirVersion = fhirSystemDao.getContext().getVersion().getVersion();
|
||||
/*
|
||||
* The conformance provider exports the supported resources, search parameters, etc for
|
||||
* this server. The JPA version adds resourceProviders counts to the exported statement, so it
|
||||
@@ -137,7 +140,7 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
* provide further customization of your server's CapabilityStatement
|
||||
*/
|
||||
|
||||
|
||||
FhirVersionEnum fhirVersion = fhirSystemDao.getContext().getVersion().getVersion();
|
||||
if (fhirVersion == FhirVersionEnum.DSTU2) {
|
||||
|
||||
JpaConformanceProviderDstu2 confProvider = new JpaConformanceProviderDstu2(this, fhirSystemDao,
|
||||
|
||||
@@ -5,6 +5,7 @@ import ca.uhn.fhir.jpa.binstore.DatabaseBlobBinaryStorageSvcImpl;
|
||||
import ca.uhn.fhir.jpa.binstore.IBinaryStorageSvc;
|
||||
import ca.uhn.fhir.jpa.config.HibernatePropertiesProvider;
|
||||
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
|
||||
import ca.uhn.fhir.jpa.model.config.PartitionSettings.CrossPartitionReferenceMode;
|
||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||
import ca.uhn.fhir.jpa.subscription.channel.subscription.SubscriptionDeliveryHandlerFactory;
|
||||
import ca.uhn.fhir.jpa.subscription.match.deliver.email.IEmailSender;
|
||||
@@ -77,7 +78,6 @@ public class FhirServerConfigCommon {
|
||||
retVal.setAllowMultipleDelete(appProperties.getAllow_multiple_delete());
|
||||
retVal.setAllowExternalReferences(appProperties.getAllow_external_references());
|
||||
retVal.setExpungeEnabled(appProperties.getExpunge_enabled());
|
||||
retVal.setAutoCreatePlaceholderReferenceTargets(appProperties.getAllow_placeholder_references());
|
||||
if(appProperties.getSubscription() != null && appProperties.getSubscription().getEmail() != null)
|
||||
retVal.setEmailFromAddress(appProperties.getSubscription().getEmail().getFrom());
|
||||
|
||||
@@ -126,6 +126,12 @@ public class FhirServerConfigCommon {
|
||||
// Partitioning
|
||||
if (appProperties.getPartitioning() != null) {
|
||||
retVal.setPartitioningEnabled(true);
|
||||
retVal.setIncludePartitionInSearchHashes(appProperties.getPartitioning().getPartitioning_include_in_search_hashes());
|
||||
if(appProperties.getPartitioning().getAllow_references_across_partitions()) {
|
||||
retVal.setAllowReferencesAcrossPartitions(CrossPartitionReferenceMode.ALLOWED_UNQUALIFIED);
|
||||
} else {
|
||||
retVal.setAllowReferencesAcrossPartitions(CrossPartitionReferenceMode.NOT_ALLOWED);
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
||||
@@ -5,11 +5,9 @@ import ca.uhn.fhir.jpa.config.BaseJavaConfigR4;
|
||||
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
||||
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
||||
import ca.uhn.fhir.jpa.starter.annotations.OnR4Condition;
|
||||
import ca.uhn.fhir.jpa.starter.cql.StarterCqlR4Config;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.context.annotation.*;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
import org.springframework.orm.jpa.JpaTransactionManager;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
@@ -19,6 +17,7 @@ import javax.sql.DataSource;
|
||||
|
||||
@Configuration
|
||||
@Conditional(OnR4Condition.class)
|
||||
@Import(StarterCqlR4Config.class)
|
||||
public class FhirServerConfigR4 extends BaseJavaConfigR4 {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package ca.uhn.fhir.jpa.starter.cql;
|
||||
|
||||
import org.springframework.context.annotation.Condition;
|
||||
import org.springframework.context.annotation.ConditionContext;
|
||||
import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
|
||||
public class CqlConfigCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean matches(ConditionContext theConditionContext, AnnotatedTypeMetadata theAnnotatedTypeMetadata) {
|
||||
String property = theConditionContext.getEnvironment().getProperty("hapi.fhir.cql_enabled");
|
||||
boolean enabled = Boolean.parseBoolean(property);
|
||||
return enabled;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package ca.uhn.fhir.jpa.starter.cql;
|
||||
|
||||
import ca.uhn.fhir.cql.config.CqlDstu3Config;
|
||||
import ca.uhn.fhir.jpa.starter.annotations.OnDSTU3Condition;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@Configuration
|
||||
@Conditional({OnDSTU3Condition.class, CqlConfigCondition.class})
|
||||
@Import({CqlDstu3Config.class})
|
||||
public class StarterCqlDstu3Config {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package ca.uhn.fhir.jpa.starter.cql;
|
||||
|
||||
import ca.uhn.fhir.cql.config.CqlR4Config;
|
||||
import ca.uhn.fhir.jpa.starter.annotations.OnR4Condition;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@Conditional({OnR4Condition.class, CqlConfigCondition.class})
|
||||
@Import({CqlR4Config.class})
|
||||
public class StarterCqlR4Config {
|
||||
}
|
||||
@@ -55,6 +55,7 @@ hapi:
|
||||
# allow_override_default_search_params: true
|
||||
# allow_placeholder_references: true
|
||||
# auto_create_placeholder_reference_targets: false
|
||||
# cql_enabled: true
|
||||
# default_encoding: JSON
|
||||
# default_pretty_print: true
|
||||
# default_page_size: 20
|
||||
@@ -70,9 +71,8 @@ hapi:
|
||||
# graphql_enabled: true
|
||||
# narrative_enabled: true
|
||||
#partitioning:
|
||||
# cross_partition_reference_mode: true
|
||||
# multitenancy_enabled: true
|
||||
# partitioning_include_in_search_hashes: true
|
||||
# allow_references_across_partitions: false
|
||||
# partitioning_include_in_search_hashes: false
|
||||
#cors:
|
||||
# allow_Credentials: true
|
||||
# Supports multiple, comma separated allowed origin entries
|
||||
@@ -111,7 +111,6 @@ hapi:
|
||||
# responses_enabled: true
|
||||
# binary_storage_enabled: true
|
||||
# bulk_export_enabled: true
|
||||
# partitioning_multitenancy_enabled:
|
||||
# subscription:
|
||||
# resthook_enabled: false
|
||||
# websocket_enabled: false
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.springframework.beans" level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</logger>
|
||||
<logger name="org.springframework.core" level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</logger>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
|
||||
@@ -1,28 +1,35 @@
|
||||
package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||
import ca.uhn.fhir.model.primitive.IdDt;
|
||||
import ca.uhn.fhir.rest.api.CacheControlDirective;
|
||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||
import ca.uhn.fhir.rest.api.MethodOutcome;
|
||||
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 org.apache.commons.io.FileUtils;
|
||||
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.dstu3.model.Bundle;
|
||||
import org.hl7.fhir.dstu3.model.Observation;
|
||||
import org.hl7.fhir.dstu3.model.Patient;
|
||||
import org.hl7.fhir.dstu3.model.Subscription;
|
||||
import org.hl7.fhir.dstu3.model.*;
|
||||
import org.hl7.fhir.instance.model.api.IIdType;
|
||||
import org.junit.Assert;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -34,6 +41,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
{
|
||||
"spring.batch.job.enabled=false",
|
||||
"spring.datasource.url=jdbc:h2:mem:dbr3",
|
||||
"hapi.fhir.cql_enabled=true",
|
||||
"hapi.fhir.fhir_version=dstu3",
|
||||
"hapi.fhir.subscription.websocket_enabled=true",
|
||||
"hapi.fhir.allow_external_references=true",
|
||||
@@ -41,16 +49,29 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
})
|
||||
|
||||
|
||||
public class ExampleServerDstu3IT {
|
||||
public class ExampleServerDstu3IT implements IServerSupport {
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||
private IGenericClient ourClient;
|
||||
private FhirContext ourCtx;
|
||||
|
||||
@Autowired
|
||||
DaoRegistry myDaoRegistry;
|
||||
|
||||
@LocalServerPort
|
||||
private int port;
|
||||
|
||||
@Test
|
||||
@BeforeEach
|
||||
void beforeEach() {
|
||||
ourCtx = FhirContext.forDstu3();
|
||||
ourCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER);
|
||||
ourCtx.getRestfulClientFactory().setSocketTimeout(1200 * 1000);
|
||||
String ourServerBase = "http://localhost:" + port + "/fhir/";
|
||||
ourClient = ourCtx.newRestfulGenericClient(ourServerBase);
|
||||
ourClient.registerInterceptor(new LoggingInterceptor(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateAndRead() {
|
||||
|
||||
String methodName = "testCreateResourceConditional";
|
||||
@@ -63,6 +84,75 @@ public class ExampleServerDstu3IT {
|
||||
assertEquals(methodName, pt2.getName().get(0).getFamily());
|
||||
}
|
||||
|
||||
// Currently fails with:
|
||||
// ca.uhn.fhir.rest.server.exceptions.InternalErrorException: HTTP 500 : Failed to call access method: java.lang.IllegalArgumentException: Could not load library source for libraries referenced in Measure/Measure/measure-EXM104-FHIR3-8.1.000/_history/1.
|
||||
//@Test
|
||||
public void testCQLEvaluateMeasureEXM104() throws IOException {
|
||||
String measureId = "measure-EXM104-FHIR3-8.1.000";
|
||||
|
||||
int numFilesLoaded = loadDataFromDirectory("dstu3/EXM104/EXM104_FHIR3-8.1.000-files");
|
||||
//assertEquals(numFilesLoaded, 3);
|
||||
ourLog.info("{} files imported successfully!", numFilesLoaded);
|
||||
//loadBundle("dstu3/EXM104/EXM104_FHIR3-8.1.000-bundle.json", ourCtx, ourClient);
|
||||
|
||||
// http://localhost:8080/fhir/Measure/measure-EXM104-FHIR3-8.1.000/$evaluate-measure?periodStart=2019-01-01&periodEnd=2019-12-31
|
||||
Parameters inParams = new Parameters();
|
||||
// inParams.addParameter().setName("measure").setValue(new StringType("Measure/measure-EXM104-8.2.000"));
|
||||
// inParams.addParameter().setName("patient").setValue(new StringType("Patient/numer-EXM104-FHIR3"));
|
||||
// inParams.addParameter().setName("periodStart").setValue(new StringType("2019-01-01"));
|
||||
// inParams.addParameter().setName("periodEnd").setValue(new StringType("2019-12-31"));
|
||||
|
||||
Parameters outParams = ourClient
|
||||
.operation()
|
||||
.onInstance(new IdDt("Measure", measureId))
|
||||
.named("$evaluate-measure")
|
||||
.withParameters(inParams)
|
||||
.cacheControl(new CacheControlDirective().setNoCache(true))
|
||||
.withAdditionalHeader("Content-Type", "application/json")
|
||||
.useHttpGet()
|
||||
.execute();
|
||||
|
||||
List<Parameters.ParametersParameterComponent> response = outParams.getParameter();
|
||||
Assert.assertTrue(!response.isEmpty());
|
||||
Parameters.ParametersParameterComponent component = response.get(0);
|
||||
Assert.assertTrue(component.getResource() instanceof MeasureReport);
|
||||
MeasureReport report = (MeasureReport) component.getResource();
|
||||
Assert.assertEquals("Measure/"+measureId, report.getMeasure());
|
||||
}
|
||||
|
||||
private int loadDataFromDirectory(String theDirectoryName) throws IOException {
|
||||
int count = 0;
|
||||
ourLog.info("Reading files in directory: {}", theDirectoryName);
|
||||
ClassPathResource dir = new ClassPathResource(theDirectoryName);
|
||||
Collection<File> files = FileUtils.listFiles(dir.getFile(), null, false);
|
||||
ourLog.info("{} files found.", files.size());
|
||||
for (File file : files) {
|
||||
String filename = file.getAbsolutePath();
|
||||
ourLog.info("Processing filename '{}'", filename);
|
||||
if (filename.endsWith(".cql") || filename.contains("expectedresults")) {
|
||||
// Ignore .cql and expectedresults files
|
||||
ourLog.info("Ignoring file: '{}'", filename);
|
||||
} else if (filename.endsWith(".json")) {
|
||||
if (filename.contains("bundle")) {
|
||||
loadBundle(filename, ourCtx, ourClient);
|
||||
} else {
|
||||
loadResource(filename, ourCtx, myDaoRegistry);
|
||||
}
|
||||
count++;
|
||||
} else {
|
||||
ourLog.info("Ignoring file: '{}'", filename);
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
private Bundle loadBundle(String theLocation, FhirContext theCtx, IGenericClient theClient) throws IOException {
|
||||
String json = stringFromResource(theLocation);
|
||||
Bundle bundle = (Bundle) theCtx.newJsonParser().parseResource(json);
|
||||
Bundle result = (Bundle) theClient.transaction().withBundle(bundle).execute();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWebsocketSubscription() throws Exception {
|
||||
/*
|
||||
@@ -121,15 +211,4 @@ public class ExampleServerDstu3IT {
|
||||
ourClient.delete().resourceById(mySubscriptionId).execute();
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void beforeEach() {
|
||||
|
||||
ourCtx = FhirContext.forDstu3();
|
||||
ourCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER);
|
||||
ourCtx.getRestfulClientFactory().setSocketTimeout(1200 * 1000);
|
||||
String ourServerBase = "http://localhost:" + port + "/fhir/";
|
||||
ourClient = ourCtx.newRestfulGenericClient(ourServerBase);
|
||||
ourClient.registerInterceptor(new LoggingInterceptor(true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import static ca.uhn.fhir.util.TestUtil.waitForSize;
|
||||
import static java.util.Comparator.comparing;
|
||||
import static org.awaitility.Awaitility.await;
|
||||
import static org.awaitility.Awaitility.pollInSameThread;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
@@ -49,8 +50,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
"spring.main.allow-bean-definition-overriding=true"
|
||||
})
|
||||
public class ExampleServerR4IT {
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerR4IT.class);
|
||||
private IGenericClient ourClient;
|
||||
private FhirContext ourCtx;
|
||||
|
||||
@@ -61,8 +61,8 @@ public class ExampleServerR4IT {
|
||||
@Test
|
||||
@Order(0)
|
||||
void testCreateAndRead() {
|
||||
|
||||
String methodName = "testCreateResourceConditional";
|
||||
String methodName = "testCreateAndRead";
|
||||
ourLog.info("Entering " + methodName + "()...");
|
||||
|
||||
Patient pt = new Patient();
|
||||
pt.setActive(true);
|
||||
@@ -78,7 +78,7 @@ public class ExampleServerR4IT {
|
||||
// Test MDM
|
||||
|
||||
// Wait until the MDM message has been processed
|
||||
await().until(() -> getPatients().size(), equalTo(2));
|
||||
await().until(() -> getPatients().size(), equalTo(3));
|
||||
List<Patient> persons = getPatients();
|
||||
Patient goldenRecord = persons.get(0);
|
||||
|
||||
|
||||
42
src/test/java/ca/uhn/fhir/jpa/starter/IServerSupport.java
Normal file
42
src/test/java/ca/uhn/fhir/jpa/starter/IServerSupport.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
|
||||
import com.google.common.base.Charsets;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.springframework.core.io.DefaultResourceLoader;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public interface IServerSupport {
|
||||
|
||||
default IBaseResource loadResource(String theLocation, FhirContext theFhirContext, DaoRegistry theDaoRegistry) throws IOException {
|
||||
String json = stringFromResource(theLocation);
|
||||
IBaseResource resource = theFhirContext.newJsonParser().parseResource(json);
|
||||
IFhirResourceDao<IBaseResource> dao = theDaoRegistry.getResourceDao(resource.getIdElement().getResourceType());
|
||||
if (dao == null) {
|
||||
return null;
|
||||
} else {
|
||||
dao.update(resource);
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
|
||||
default String stringFromResource(String theLocation) throws IOException {
|
||||
InputStream is = null;
|
||||
if (theLocation.startsWith(File.separator)) {
|
||||
is = new FileInputStream(theLocation);
|
||||
} else {
|
||||
DefaultResourceLoader resourceLoader = new DefaultResourceLoader();
|
||||
Resource resource = resourceLoader.getResource(theLocation);
|
||||
is = resource.getInputStream();
|
||||
}
|
||||
return IOUtils.toString(is, Charsets.UTF_8);
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ hapi:
|
||||
# allow_override_default_search_params: true
|
||||
# allow_placeholder_references: true
|
||||
# auto_create_placeholder_reference_targets: false
|
||||
# cql_enabled: false
|
||||
# default_encoding: JSON
|
||||
# default_pretty_print: true
|
||||
# default_page_size: 20
|
||||
|
||||
4409
src/test/resources/dstu3/EXM104/EXM104_FHIR3-8.1.000-bundle.json
Normal file
4409
src/test/resources/dstu3/EXM104/EXM104_FHIR3-8.1.000-bundle.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,303 @@
|
||||
{
|
||||
"resourceType": "MeasureReport",
|
||||
"id": "measurereport-denom-EXM104-FHIR3-8.1.000-expectedresults",
|
||||
"contained": [
|
||||
{
|
||||
"resourceType": "Bundle",
|
||||
"id": "b20ba55e-a72e-493d-868d-e9f6c007d11a",
|
||||
"type": "collection",
|
||||
"entry": [
|
||||
{
|
||||
"fullUrl": "Condition/denom-EXM104-FHIR3-1",
|
||||
"resource": {
|
||||
"resourceType": "Condition",
|
||||
"id": "denom-EXM104-FHIR3-1",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"
|
||||
]
|
||||
},
|
||||
"verificationStatus": "confirmed",
|
||||
"category": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/condition-category",
|
||||
"code": "encounter-diagnosis",
|
||||
"display": "Encounter Diagnosis"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "116288000",
|
||||
"display": "Paralytic stroke (disorder)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/denom-EXM104-FHIR3"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Encounter/denom-EXM104-FHIR3-2",
|
||||
"resource": {
|
||||
"resourceType": "Encounter",
|
||||
"id": "denom-EXM104-FHIR3-2",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"
|
||||
]
|
||||
},
|
||||
"status": "finished",
|
||||
"class": {
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
||||
"code": "IMP",
|
||||
"display": "inpatient encounter"
|
||||
},
|
||||
"type": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "32485007",
|
||||
"display": "Hospital admission (procedure)"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"subject": {
|
||||
"reference": "Patient/denom-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-08-21T00:00:00-06:00",
|
||||
"end": "2019-12-19T08:15:00-07:00"
|
||||
},
|
||||
"diagnosis": [
|
||||
{
|
||||
"condition": {
|
||||
"reference": "Condition/denom-EXM104-FHIR3-1"
|
||||
},
|
||||
"role": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://hl7.org/fhir/diagnosis-role",
|
||||
"code": "billing",
|
||||
"display": "Billing"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rank": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Patient/denom-EXM104-FHIR3",
|
||||
"resource": {
|
||||
"resourceType": "Patient",
|
||||
"id": "denom-EXM104-FHIR3",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"status": "generated",
|
||||
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Rick <b>JONES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9999999910</td></tr><tr><td>Date of birth</td><td><span>05 November 1955</span></td></tr></tbody></table></div>"
|
||||
},
|
||||
"extension": [
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2054-5",
|
||||
"display": "Black or African American"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2135-2",
|
||||
"display": "Hispanic or Latino"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"identifier": [
|
||||
{
|
||||
"use": "usual",
|
||||
"type": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||
"code": "MR",
|
||||
"display": "Medical Record Number"
|
||||
}
|
||||
]
|
||||
},
|
||||
"system": "http://hospital.smarthealthit.org",
|
||||
"value": "9999999910"
|
||||
}
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"family": "Jones",
|
||||
"given": [
|
||||
"Rick"
|
||||
]
|
||||
}
|
||||
],
|
||||
"gender": "male",
|
||||
"birthDate": "1955-11-05"
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "a6811e61-b875-43ac-960d-de15dab68184",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "a6811e61-b875-43ac-960d-de15dab68184",
|
||||
"title": "initial-population",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "denom-EXM104-FHIR3-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"item": {
|
||||
"reference": "denom-EXM104-FHIR3-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"item": {
|
||||
"reference": "denom-EXM104-FHIR3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "f8cb86c0-faf5-433d-bb60-d1bbbaf67abc",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "f8cb86c0-faf5-433d-bb60-d1bbbaf67abc",
|
||||
"title": "denominator",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "denom-EXM104-FHIR3-1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"status": "complete",
|
||||
"type": "individual",
|
||||
"measure": {
|
||||
"reference": "Measure/measure-EXM104-FHIR3-8.1.000"
|
||||
},
|
||||
"patient": {
|
||||
"reference": "Patient/denom-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-01-01T00:00:00-07:00",
|
||||
"end": "2019-12-31T00:00:00-07:00"
|
||||
},
|
||||
"group": [
|
||||
{
|
||||
"identifier": {
|
||||
"value": "group-1"
|
||||
},
|
||||
"population": [
|
||||
{
|
||||
"identifier": {
|
||||
"value": "initial-population-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "initial-population",
|
||||
"display": "Initial Population"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "numerator-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "numerator",
|
||||
"display": "Numerator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 0
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "denominator-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "denominator",
|
||||
"display": "Denominator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "denominator-exclusions-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "denominator-exclusion",
|
||||
"display": "Denominator Exclusion"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 0
|
||||
}
|
||||
],
|
||||
"measureScore": 0.0
|
||||
}
|
||||
],
|
||||
"evaluatedResources": {
|
||||
"reference": "#b20ba55e-a72e-493d-868d-e9f6c007d11a"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,353 @@
|
||||
{
|
||||
"resourceType": "MeasureReport",
|
||||
"id": "measurereport-numer-EXM104-FHIR3-8.1.000-expectedresults",
|
||||
"contained": [
|
||||
{
|
||||
"resourceType": "Bundle",
|
||||
"id": "edc87d47-5804-4d85-8874-ee2d50e51c51",
|
||||
"type": "collection",
|
||||
"entry": [
|
||||
{
|
||||
"fullUrl": "MedicationRequest/numer-EXM104-FHIR3-5",
|
||||
"resource": {
|
||||
"resourceType": "MedicationRequest",
|
||||
"id": "numer-EXM104-FHIR3-5",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00"
|
||||
},
|
||||
"status": "completed",
|
||||
"intent": "order",
|
||||
"category": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
|
||||
"code": "discharge",
|
||||
"display": "Discharge"
|
||||
}
|
||||
]
|
||||
},
|
||||
"medicationCodeableConcept": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
|
||||
"code": "1037045",
|
||||
"display": "dabigatran etexilate 150 MG Oral Capsule"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
},
|
||||
"authoredOn": "2019-12-19T08:00:00-07:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Patient/numer-EXM104-FHIR3",
|
||||
"resource": {
|
||||
"resourceType": "Patient",
|
||||
"id": "numer-EXM104-FHIR3",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"status": "generated",
|
||||
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Louise <b>JONES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9999999911</td></tr><tr><td>Date of birth</td><td><span>21 November 1971</span></td></tr></tbody></table></div>"
|
||||
},
|
||||
"extension": [
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2106-3",
|
||||
"display": "White"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2186-5",
|
||||
"display": "Not Hispanic or Latino"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"identifier": [
|
||||
{
|
||||
"use": "usual",
|
||||
"type": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||
"code": "MR",
|
||||
"display": "Medical Record Number"
|
||||
}
|
||||
]
|
||||
},
|
||||
"system": "http://hospital.smarthealthit.org",
|
||||
"value": "9999999911"
|
||||
}
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"family": "Jones",
|
||||
"given": [
|
||||
"Louise"
|
||||
]
|
||||
}
|
||||
],
|
||||
"gender": "female",
|
||||
"birthDate": "1971-11-21"
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "475b43c7-73fd-4400-a23b-b0accf116c79",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "475b43c7-73fd-4400-a23b-b0accf116c79",
|
||||
"title": "initial-population",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3-1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "94606d36-6bd7-48b5-a519-7af88afa0b68",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "94606d36-6bd7-48b5-a519-7af88afa0b68",
|
||||
"title": "denominator",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3-1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "7720275f-18c4-435c-8eeb-b154ac3b882a",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "7720275f-18c4-435c-8eeb-b154ac3b882a",
|
||||
"title": "numerator",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3-5"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Encounter/numer-EXM104-FHIR3-2",
|
||||
"resource": {
|
||||
"resourceType": "Encounter",
|
||||
"id": "numer-EXM104-FHIR3-2",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"
|
||||
]
|
||||
},
|
||||
"status": "finished",
|
||||
"class": {
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
||||
"code": "IMP",
|
||||
"display": "inpatient encounter"
|
||||
},
|
||||
"type": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "32485007",
|
||||
"display": "Hospital admission (procedure)"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-08-21T00:00:00-06:00",
|
||||
"end": "2019-12-19T08:15:00-07:00"
|
||||
},
|
||||
"diagnosis": [
|
||||
{
|
||||
"condition": {
|
||||
"reference": "Condition/numer-EXM104-FHIR3-1"
|
||||
},
|
||||
"role": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://hl7.org/fhir/diagnosis-role",
|
||||
"code": "billing",
|
||||
"display": "Billing"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rank": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Condition/numer-EXM104-FHIR3-1",
|
||||
"resource": {
|
||||
"resourceType": "Condition",
|
||||
"id": "numer-EXM104-FHIR3-1",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"
|
||||
]
|
||||
},
|
||||
"verificationStatus": "confirmed",
|
||||
"category": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/condition-category",
|
||||
"code": "encounter-diagnosis",
|
||||
"display": "Encounter Diagnosis"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "116288000",
|
||||
"display": "Paralytic stroke (disorder)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"status": "complete",
|
||||
"type": "individual",
|
||||
"measure": {
|
||||
"reference": "Measure/measure-EXM104-FHIR3-8.1.000"
|
||||
},
|
||||
"patient": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-01-01T00:00:00-07:00",
|
||||
"end": "2019-12-31T00:00:00-07:00"
|
||||
},
|
||||
"group": [
|
||||
{
|
||||
"identifier": {
|
||||
"value": "group-1"
|
||||
},
|
||||
"population": [
|
||||
{
|
||||
"identifier": {
|
||||
"value": "initial-population-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "initial-population",
|
||||
"display": "Initial Population"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "numerator-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "numerator",
|
||||
"display": "Numerator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "denominator-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "denominator",
|
||||
"display": "Denominator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "denominator-exclusions-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "denominator-exclusion",
|
||||
"display": "Denominator Exclusion"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 0
|
||||
}
|
||||
],
|
||||
"measureScore": 1.0
|
||||
}
|
||||
],
|
||||
"evaluatedResources": {
|
||||
"reference": "#edc87d47-5804-4d85-8874-ee2d50e51c51"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,480 @@
|
||||
{
|
||||
"resourceType": "Bundle",
|
||||
"id": "tests-denom-EXM104-FHIR3-bundle",
|
||||
"type": "transaction",
|
||||
"entry": [
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "Condition",
|
||||
"id": "denom-EXM104-FHIR3-1",
|
||||
"meta": {
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"
|
||||
]
|
||||
},
|
||||
"verificationStatus": "confirmed",
|
||||
"category": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/condition-category",
|
||||
"code": "encounter-diagnosis",
|
||||
"display": "Encounter Diagnosis"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "116288000",
|
||||
"display": "Paralytic stroke (disorder)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/denom-EXM104-FHIR3"
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "Condition/denom-EXM104-FHIR3-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "Encounter",
|
||||
"id": "denom-EXM104-FHIR3-2",
|
||||
"meta": {
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"
|
||||
]
|
||||
},
|
||||
"status": "finished",
|
||||
"class": {
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
||||
"code": "IMP",
|
||||
"display": "inpatient encounter"
|
||||
},
|
||||
"type": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "32485007",
|
||||
"display": "Hospital admission (procedure)"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"subject": {
|
||||
"reference": "Patient/denom-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-08-21T00:00:00-06:00",
|
||||
"end": "2019-12-19T08:15:00-07:00"
|
||||
},
|
||||
"diagnosis": [
|
||||
{
|
||||
"condition": {
|
||||
"reference": "Condition/denom-EXM104-FHIR3-1"
|
||||
},
|
||||
"role": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://hl7.org/fhir/diagnosis-role",
|
||||
"code": "billing",
|
||||
"display": "Billing"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rank": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "Encounter/denom-EXM104-FHIR3-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "MeasureReport",
|
||||
"id": "measurereport-denom-EXM104-FHIR3",
|
||||
"contained": [
|
||||
{
|
||||
"resourceType": "Bundle",
|
||||
"id": "b20ba55e-a72e-493d-868d-e9f6c007d11a",
|
||||
"type": "collection",
|
||||
"entry": [
|
||||
{
|
||||
"fullUrl": "Condition/denom-EXM104-FHIR3-1",
|
||||
"resource": {
|
||||
"resourceType": "Condition",
|
||||
"id": "denom-EXM104-FHIR3-1",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"
|
||||
]
|
||||
},
|
||||
"verificationStatus": "confirmed",
|
||||
"category": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/condition-category",
|
||||
"code": "encounter-diagnosis",
|
||||
"display": "Encounter Diagnosis"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "116288000",
|
||||
"display": "Paralytic stroke (disorder)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/denom-EXM104-FHIR3"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Encounter/denom-EXM104-FHIR3-2",
|
||||
"resource": {
|
||||
"resourceType": "Encounter",
|
||||
"id": "denom-EXM104-FHIR3-2",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"
|
||||
]
|
||||
},
|
||||
"status": "finished",
|
||||
"class": {
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
||||
"code": "IMP",
|
||||
"display": "inpatient encounter"
|
||||
},
|
||||
"type": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "32485007",
|
||||
"display": "Hospital admission (procedure)"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"subject": {
|
||||
"reference": "Patient/denom-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-08-21T00:00:00-06:00",
|
||||
"end": "2019-12-19T08:15:00-07:00"
|
||||
},
|
||||
"diagnosis": [
|
||||
{
|
||||
"condition": {
|
||||
"reference": "Condition/denom-EXM104-FHIR3-1"
|
||||
},
|
||||
"role": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://hl7.org/fhir/diagnosis-role",
|
||||
"code": "billing",
|
||||
"display": "Billing"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rank": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Patient/denom-EXM104-FHIR3",
|
||||
"resource": {
|
||||
"resourceType": "Patient",
|
||||
"id": "denom-EXM104-FHIR3",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"status": "generated",
|
||||
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Rick <b>JONES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9999999910</td></tr><tr><td>Date of birth</td><td><span>05 November 1955</span></td></tr></tbody></table></div>"
|
||||
},
|
||||
"extension": [
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2054-5",
|
||||
"display": "Black or African American"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2135-2",
|
||||
"display": "Hispanic or Latino"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"identifier": [
|
||||
{
|
||||
"use": "usual",
|
||||
"type": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||
"code": "MR",
|
||||
"display": "Medical Record Number"
|
||||
}
|
||||
]
|
||||
},
|
||||
"system": "http://hospital.smarthealthit.org",
|
||||
"value": "9999999910"
|
||||
}
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"family": "Jones",
|
||||
"given": [
|
||||
"Rick"
|
||||
]
|
||||
}
|
||||
],
|
||||
"gender": "male",
|
||||
"birthDate": "1955-11-05"
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "a6811e61-b875-43ac-960d-de15dab68184",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "a6811e61-b875-43ac-960d-de15dab68184",
|
||||
"title": "initial-population",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "denom-EXM104-FHIR3-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"item": {
|
||||
"reference": "denom-EXM104-FHIR3-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"item": {
|
||||
"reference": "denom-EXM104-FHIR3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "f8cb86c0-faf5-433d-bb60-d1bbbaf67abc",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "f8cb86c0-faf5-433d-bb60-d1bbbaf67abc",
|
||||
"title": "denominator",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "denom-EXM104-FHIR3-1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"status": "complete",
|
||||
"type": "individual",
|
||||
"measure": {
|
||||
"reference": "Measure/measure-EXM104-FHIR3-8.1.000"
|
||||
},
|
||||
"patient": {
|
||||
"reference": "Patient/denom-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-01-01T00:00:00-07:00",
|
||||
"end": "2019-12-31T00:00:00-07:00"
|
||||
},
|
||||
"group": [
|
||||
{
|
||||
"identifier": {
|
||||
"value": "group-1"
|
||||
},
|
||||
"population": [
|
||||
{
|
||||
"identifier": {
|
||||
"value": "initial-population-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "initial-population",
|
||||
"display": "Initial Population"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "numerator-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "numerator",
|
||||
"display": "Numerator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 0
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "denominator-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "denominator",
|
||||
"display": "Denominator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "denominator-exclusions-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "denominator-exclusion",
|
||||
"display": "Denominator Exclusion"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 0
|
||||
}
|
||||
],
|
||||
"measureScore": 0.0
|
||||
}
|
||||
],
|
||||
"evaluatedResources": {
|
||||
"reference": "#b20ba55e-a72e-493d-868d-e9f6c007d11a"
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "MeasureReport/measurereport-denom-EXM104-FHIR3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "Patient",
|
||||
"id": "denom-EXM104-FHIR3",
|
||||
"meta": {
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
|
||||
]
|
||||
},
|
||||
"extension": [
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2054-5",
|
||||
"display": "Black or African American"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2135-2",
|
||||
"display": "Hispanic or Latino"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"identifier": [
|
||||
{
|
||||
"use": "usual",
|
||||
"type": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||
"code": "MR",
|
||||
"display": "Medical Record Number"
|
||||
}
|
||||
]
|
||||
},
|
||||
"system": "http://hospital.smarthealthit.org",
|
||||
"value": "9999999910"
|
||||
}
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"family": "Jones",
|
||||
"given": [
|
||||
"Rick"
|
||||
]
|
||||
}
|
||||
],
|
||||
"gender": "male",
|
||||
"birthDate": "1955-11-05"
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "Patient/denom-EXM104-FHIR3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,564 @@
|
||||
{
|
||||
"resourceType": "Bundle",
|
||||
"id": "tests-numer-EXM104-FHIR3-bundle",
|
||||
"type": "transaction",
|
||||
"entry": [
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "Condition",
|
||||
"id": "numer-EXM104-FHIR3-1",
|
||||
"meta": {
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"
|
||||
]
|
||||
},
|
||||
"verificationStatus": "confirmed",
|
||||
"category": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/condition-category",
|
||||
"code": "encounter-diagnosis",
|
||||
"display": "Encounter Diagnosis"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "116288000",
|
||||
"display": "Paralytic stroke (disorder)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "Condition/numer-EXM104-FHIR3-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "Encounter",
|
||||
"id": "numer-EXM104-FHIR3-2",
|
||||
"meta": {
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"
|
||||
]
|
||||
},
|
||||
"status": "finished",
|
||||
"class": {
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
||||
"code": "IMP",
|
||||
"display": "inpatient encounter"
|
||||
},
|
||||
"type": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "32485007",
|
||||
"display": "Hospital admission (procedure)"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-08-21T00:00:00-06:00",
|
||||
"end": "2019-12-19T08:15:00-07:00"
|
||||
},
|
||||
"diagnosis": [
|
||||
{
|
||||
"condition": {
|
||||
"reference": "Condition/numer-EXM104-FHIR3-1"
|
||||
},
|
||||
"role": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://hl7.org/fhir/diagnosis-role",
|
||||
"code": "billing",
|
||||
"display": "Billing"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rank": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "Encounter/numer-EXM104-FHIR3-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "MeasureReport",
|
||||
"id": "measurereport-numer-EXM104-FHIR3",
|
||||
"contained": [
|
||||
{
|
||||
"resourceType": "Bundle",
|
||||
"id": "edc87d47-5804-4d85-8874-ee2d50e51c51",
|
||||
"type": "collection",
|
||||
"entry": [
|
||||
{
|
||||
"fullUrl": "MedicationRequest/numer-EXM104-FHIR3-5",
|
||||
"resource": {
|
||||
"resourceType": "MedicationRequest",
|
||||
"id": "numer-EXM104-FHIR3-5",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00"
|
||||
},
|
||||
"status": "completed",
|
||||
"intent": "order",
|
||||
"category": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
|
||||
"code": "discharge",
|
||||
"display": "Discharge"
|
||||
}
|
||||
]
|
||||
},
|
||||
"medicationCodeableConcept": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
|
||||
"code": "1037045",
|
||||
"display": "dabigatran etexilate 150 MG Oral Capsule"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
},
|
||||
"authoredOn": "2019-12-19T08:00:00-07:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Patient/numer-EXM104-FHIR3",
|
||||
"resource": {
|
||||
"resourceType": "Patient",
|
||||
"id": "numer-EXM104-FHIR3",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"status": "generated",
|
||||
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Louise <b>JONES </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>9999999911</td></tr><tr><td>Date of birth</td><td><span>21 November 1971</span></td></tr></tbody></table></div>"
|
||||
},
|
||||
"extension": [
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2106-3",
|
||||
"display": "White"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2186-5",
|
||||
"display": "Not Hispanic or Latino"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"identifier": [
|
||||
{
|
||||
"use": "usual",
|
||||
"type": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||
"code": "MR",
|
||||
"display": "Medical Record Number"
|
||||
}
|
||||
]
|
||||
},
|
||||
"system": "http://hospital.smarthealthit.org",
|
||||
"value": "9999999911"
|
||||
}
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"family": "Jones",
|
||||
"given": [
|
||||
"Louise"
|
||||
]
|
||||
}
|
||||
],
|
||||
"gender": "female",
|
||||
"birthDate": "1971-11-21"
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "475b43c7-73fd-4400-a23b-b0accf116c79",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "475b43c7-73fd-4400-a23b-b0accf116c79",
|
||||
"title": "initial-population",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3-1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "94606d36-6bd7-48b5-a519-7af88afa0b68",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "94606d36-6bd7-48b5-a519-7af88afa0b68",
|
||||
"title": "denominator",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3-1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "7720275f-18c4-435c-8eeb-b154ac3b882a",
|
||||
"resource": {
|
||||
"resourceType": "List",
|
||||
"id": "7720275f-18c4-435c-8eeb-b154ac3b882a",
|
||||
"title": "numerator",
|
||||
"entry": [
|
||||
{
|
||||
"item": {
|
||||
"reference": "numer-EXM104-FHIR3-5"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Encounter/numer-EXM104-FHIR3-2",
|
||||
"resource": {
|
||||
"resourceType": "Encounter",
|
||||
"id": "numer-EXM104-FHIR3-2",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"
|
||||
]
|
||||
},
|
||||
"status": "finished",
|
||||
"class": {
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
||||
"code": "IMP",
|
||||
"display": "inpatient encounter"
|
||||
},
|
||||
"type": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "32485007",
|
||||
"display": "Hospital admission (procedure)"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-08-21T00:00:00-06:00",
|
||||
"end": "2019-12-19T08:15:00-07:00"
|
||||
},
|
||||
"diagnosis": [
|
||||
{
|
||||
"condition": {
|
||||
"reference": "Condition/numer-EXM104-FHIR3-1"
|
||||
},
|
||||
"role": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://hl7.org/fhir/diagnosis-role",
|
||||
"code": "billing",
|
||||
"display": "Billing"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rank": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fullUrl": "Condition/numer-EXM104-FHIR3-1",
|
||||
"resource": {
|
||||
"resourceType": "Condition",
|
||||
"id": "numer-EXM104-FHIR3-1",
|
||||
"meta": {
|
||||
"versionId": "1",
|
||||
"lastUpdated": "2019-12-18T22:42:17.748-07:00",
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"
|
||||
]
|
||||
},
|
||||
"verificationStatus": "confirmed",
|
||||
"category": [
|
||||
{
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/condition-category",
|
||||
"code": "encounter-diagnosis",
|
||||
"display": "Encounter Diagnosis"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://snomed.info/sct",
|
||||
"code": "116288000",
|
||||
"display": "Paralytic stroke (disorder)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"status": "complete",
|
||||
"type": "individual",
|
||||
"measure": {
|
||||
"reference": "Measure/measure-EXM104-FHIR3-8.1.000"
|
||||
},
|
||||
"patient": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
},
|
||||
"period": {
|
||||
"start": "2019-01-01T00:00:00-07:00",
|
||||
"end": "2019-12-31T00:00:00-07:00"
|
||||
},
|
||||
"group": [
|
||||
{
|
||||
"identifier": {
|
||||
"value": "group-1"
|
||||
},
|
||||
"population": [
|
||||
{
|
||||
"identifier": {
|
||||
"value": "initial-population-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "initial-population",
|
||||
"display": "Initial Population"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "numerator-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "numerator",
|
||||
"display": "Numerator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "denominator-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "denominator",
|
||||
"display": "Denominator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"value": "denominator-exclusions-identifier"
|
||||
},
|
||||
"code": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
|
||||
"code": "denominator-exclusion",
|
||||
"display": "Denominator Exclusion"
|
||||
}
|
||||
]
|
||||
},
|
||||
"count": 0
|
||||
}
|
||||
],
|
||||
"measureScore": 1.0
|
||||
}
|
||||
],
|
||||
"evaluatedResources": {
|
||||
"reference": "#edc87d47-5804-4d85-8874-ee2d50e51c51"
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "MeasureReport/measurereport-numer-EXM104-FHIR3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "MedicationRequest",
|
||||
"id": "numer-EXM104-FHIR3-5",
|
||||
"status": "completed",
|
||||
"intent": "order",
|
||||
"category": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
|
||||
"code": "discharge",
|
||||
"display": "Discharge"
|
||||
}
|
||||
]
|
||||
},
|
||||
"medicationCodeableConcept": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
|
||||
"code": "1037045",
|
||||
"display": "dabigatran etexilate 150 MG Oral Capsule"
|
||||
}
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"reference": "Patient/numer-EXM104-FHIR3"
|
||||
},
|
||||
"authoredOn": "2019-12-19T08:00:00-07:00"
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "MedicationRequest/numer-EXM104-FHIR3-5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"resource": {
|
||||
"resourceType": "Patient",
|
||||
"id": "numer-EXM104-FHIR3",
|
||||
"meta": {
|
||||
"profile": [
|
||||
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
|
||||
]
|
||||
},
|
||||
"extension": [
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2106-3",
|
||||
"display": "White"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
|
||||
"extension": [
|
||||
{
|
||||
"url": "ombCategory",
|
||||
"valueCoding": {
|
||||
"system": "urn:oid:2.16.840.1.113883.6.238",
|
||||
"code": "2186-5",
|
||||
"display": "Not Hispanic or Latino"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"identifier": [
|
||||
{
|
||||
"use": "usual",
|
||||
"type": {
|
||||
"coding": [
|
||||
{
|
||||
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||
"code": "MR",
|
||||
"display": "Medical Record Number"
|
||||
}
|
||||
]
|
||||
},
|
||||
"system": "http://hospital.smarthealthit.org",
|
||||
"value": "9999999911"
|
||||
}
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"family": "Jones",
|
||||
"given": [
|
||||
"Louise"
|
||||
]
|
||||
}
|
||||
],
|
||||
"gender": "female",
|
||||
"birthDate": "1971-11-21"
|
||||
},
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"url": "Patient/numer-EXM104-FHIR3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
4021
src/test/resources/r4/EXM104/EXM104-8.2.000-bundle.json
Normal file
4021
src/test/resources/r4/EXM104/EXM104-8.2.000-bundle.json
Normal file
File diff suppressed because one or more lines are too long
3495
src/test/resources/r4/EXM130/EXM130-7.3.000-bundle.json
Normal file
3495
src/test/resources/r4/EXM130/EXM130-7.3.000-bundle.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user