Updated jpaserver-cds-example project ... bumped cqf-ruler dependencies ... simplified base servlet and configuration ... added tests for cds hooks and other measure evaluation types

This commit is contained in:
Chris Schuler 2018-05-17 14:06:38 -06:00
parent aa2d278520
commit 0a52d78105
36 changed files with 60703 additions and 3033 deletions

View File

@ -34,7 +34,7 @@
<dependency>
<groupId>org.opencds.cqf</groupId>
<artifactId>cqf-ruler</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.2-SNAPSHOT</version>
</dependency>
<dependency>

View File

@ -8,7 +8,7 @@ public class CdsHooksServerExample extends CdsServicesServlet {
// protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// // Change how requests are handled
// }
//
// @Override
// protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// // Change discovery response

View File

@ -1,165 +1,19 @@
package ca.uhn.fhir.jpa.cds.example;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.jpa.dao.DaoConfig;
import ca.uhn.fhir.jpa.dao.IFhirSystemDao;
import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3;
import ca.uhn.fhir.jpa.provider.dstu3.JpaSystemProviderDstu3;
import ca.uhn.fhir.jpa.provider.dstu3.TerminologyUploaderProviderDstu3;
import ca.uhn.fhir.jpa.rp.dstu3.ActivityDefinitionResourceProvider;
import ca.uhn.fhir.jpa.rp.dstu3.MeasureResourceProvider;
import ca.uhn.fhir.jpa.rp.dstu3.PlanDefinitionResourceProvider;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
import ca.uhn.fhir.rest.api.EncodingEnum;
import ca.uhn.fhir.rest.server.ETagSupportEnum;
import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor;
import org.hl7.fhir.dstu3.model.Bundle;
import org.hl7.fhir.dstu3.model.Meta;
import org.opencds.cqf.providers.FHIRActivityDefinitionResourceProvider;
import org.opencds.cqf.providers.FHIRMeasureResourceProvider;
import org.opencds.cqf.providers.FHIRPlanDefinitionResourceProvider;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.WebApplicationContext;
import org.opencds.cqf.servlet.BaseServlet;
import javax.servlet.ServletException;
import java.util.Collection;
import java.util.List;
public class CdsServerExample extends RestfulServer {
public class CdsServerExample extends BaseServlet {
@SuppressWarnings("unchecked")
@Override
protected void initialize() throws ServletException {
super.initialize();
// Default setup - STU3 support only
// Source project location: https://github.com/DBCG/cqf-ruler
FhirVersionEnum fhirVersion = FhirVersionEnum.DSTU3;
setFhirContext(new FhirContext(fhirVersion));
@SuppressWarnings("unchecked")
@Override
protected void initialize() throws ServletException {
super.initialize();
// Get the spring context from the web container (it's declared in web.xml)
WebApplicationContext myAppCtx = ContextLoaderListener.getCurrentWebApplicationContext();
if (myAppCtx == null) {
throw new ServletException("Error retrieving spring context from the web container");
}
String resourceProviderBeanName = "myResourceProvidersDstu3";
List<IResourceProvider> beans = myAppCtx.getBean(resourceProviderBeanName, List.class);
setResourceProviders(beans);
Object systemProvider = myAppCtx.getBean("mySystemProviderDstu3", JpaSystemProviderDstu3.class);
setPlainProviders(systemProvider);
/*
* The conformance provider exports the supported resources, search parameters, etc for
* this server. The JPA version adds resource counts to the exported statement, so it
* is a nice addition.
*/
IFhirSystemDao<Bundle, Meta> systemDao = myAppCtx.getBean("mySystemDaoDstu3", IFhirSystemDao.class);
JpaConformanceProviderDstu3 confProvider =
new JpaConformanceProviderDstu3(this, systemDao, myAppCtx.getBean(DaoConfig.class));
confProvider.setImplementationDescription("Example Server");
setServerConformanceProvider(confProvider);
/*
* Enable ETag Support (this is already the default)
*/
setETagSupport(ETagSupportEnum.ENABLED);
/*
* This server tries to dynamically generate narratives
*/
FhirContext ctx = getFhirContext();
ctx.setNarrativeGenerator(new DefaultThymeleafNarrativeGenerator());
/*
* Default to JSON and pretty printing
*/
setDefaultPrettyPrint(true);
setDefaultResponseEncoding(EncodingEnum.JSON);
/*
* -- New in HAPI FHIR 1.5 --
* This configures the server to page search results to and from
* the database, instead of only paging them to memory. This may mean
* a performance hit when performing searches that return lots of results,
* but makes the server much more scalable.
*/
setPagingProvider(myAppCtx.getBean(DatabaseBackedPagingProvider.class));
/*
* Load interceptors for the server from Spring (these are defined in FhirServerConfig.java)
*/
Collection<IServerInterceptor> interceptorBeans = myAppCtx.getBeansOfType(IServerInterceptor.class).values();
for (IServerInterceptor interceptor : interceptorBeans) {
this.registerInterceptor(interceptor);
}
/*
* Adding resource providers from the cqf-ruler
*/
// Measure processing
FHIRMeasureResourceProvider measureProvider = new FHIRMeasureResourceProvider(getResourceProviders());
MeasureResourceProvider jpaMeasureProvider = (MeasureResourceProvider) getProvider("Measure");
measureProvider.setDao(jpaMeasureProvider.getDao());
measureProvider.setContext(jpaMeasureProvider.getContext());
// PlanDefinition processing
FHIRPlanDefinitionResourceProvider planDefProvider = new FHIRPlanDefinitionResourceProvider(getResourceProviders());
PlanDefinitionResourceProvider jpaPlanDefProvider =
(PlanDefinitionResourceProvider) getProvider("PlanDefinition");
planDefProvider.setDao(jpaPlanDefProvider.getDao());
planDefProvider.setContext(jpaPlanDefProvider.getContext());
// ActivityDefinition processing
FHIRActivityDefinitionResourceProvider actDefProvider = new FHIRActivityDefinitionResourceProvider(getResourceProviders());
ActivityDefinitionResourceProvider jpaActDefProvider =
(ActivityDefinitionResourceProvider) getProvider("ActivityDefinition");
actDefProvider.setDao(jpaActDefProvider.getDao());
actDefProvider.setContext(jpaActDefProvider.getContext());
try {
unregisterProvider(jpaMeasureProvider);
unregisterProvider(jpaPlanDefProvider);
unregisterProvider(jpaActDefProvider);
} catch (Exception e) {
throw new ServletException("Unable to unregister provider: " + e.getMessage());
}
registerProvider(measureProvider);
registerProvider(planDefProvider);
registerProvider(actDefProvider);
/*
* If you are hosting this server at a specific DNS name, the server will try to
* figure out the FHIR base URL based on what the web container tells it, but
* this doesn't always work. If you are setting links in your search bundles that
* just refer to "localhost", you might want to use a server address strategy:
*/
//setServerAddressStrategy(new HardcodedServerAddressStrategy("http://mydomain.com/fhir/baseDstu2"));
/*
* If you are using DSTU3+, you may want to add a terminology uploader, which allows
* uploading of external terminologies such as Snomed CT. Note that this uploader
* does not have any security attached (any anonymous user may use it by default)
* so it is a potential security vulnerability. Consider using an AuthorizationInterceptor
* with this feature.
*/
registerProvider(myAppCtx.getBean(TerminologyUploaderProviderDstu3.class));
}
public IResourceProvider getProvider(String name) {
for (IResourceProvider res : getResourceProviders()) {
if (res.getResourceType().getSimpleName().equals(name)) {
return res;
}
}
throw new IllegalArgumentException("This should never happen!");
}
// Add additional config and/or resource providers
}
}

View File

@ -1,124 +0,0 @@
package ca.uhn.fhir.jpa.cds.example;
import ca.uhn.fhir.jpa.config.BaseJavaConfigDstu3;
import ca.uhn.fhir.jpa.dao.DaoConfig;
import ca.uhn.fhir.jpa.search.LuceneSearchMappingFactory;
import ca.uhn.fhir.jpa.util.DerbyTenSevenHapiFhirDialect;
import ca.uhn.fhir.jpa.util.SubscriptionsRequireManualActivationInterceptorDstu3;
import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor;
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor;
import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor;
import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.commons.lang3.time.DateUtils;
import org.hibernate.jpa.HibernatePersistenceProvider;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import java.util.Properties;
/**
* This is the primary configuration file for the example server
*/
@Configuration
@EnableTransactionManagement()
public class FhirServerConfig extends BaseJavaConfigDstu3 {
/**
* Configure FHIR properties around the the JPA server via this bean
*/
@Bean()
public DaoConfig daoConfig() {
DaoConfig retVal = new DaoConfig();
retVal.setSubscriptionEnabled(true);
retVal.setSubscriptionPollDelay(5000);
retVal.setSubscriptionPurgeInactiveAfterMillis(DateUtils.MILLIS_PER_HOUR);
retVal.setAllowMultipleDelete(true);
return retVal;
}
/**
* The following bean configures the database connection. The 'url' property value of "jdbc:derby:directory:jpaserver_derby_files;create=true" indicates that the server should save resources in a
* directory called "jpaserver_derby_files".
*
* A URL to a remote database could also be placed here, along with login credentials and other properties supported by BasicDataSource.
*/
@Bean(destroyMethod = "close")
public DataSource dataSource() {
BasicDataSource retVal = new BasicDataSource();
retVal.setDriver(new org.apache.derby.jdbc.EmbeddedDriver());
retVal.setUrl("jdbc:derby:directory:target/jpaserver_derby_files;create=true");
retVal.setUsername("");
retVal.setPassword("");
return retVal;
}
@Bean()
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
LocalContainerEntityManagerFactoryBean retVal = super.entityManagerFactory();
retVal.setPersistenceUnitName("HAPI_PU");
retVal.setDataSource(dataSource());
retVal.setJpaProperties(jpaProperties());
return retVal;
}
private Properties jpaProperties() {
Properties extraProperties = new Properties();
extraProperties.put("hibernate.dialect", DerbyTenSevenHapiFhirDialect.class.getName());
extraProperties.put("hibernate.format_sql", "true");
extraProperties.put("hibernate.show_sql", "false");
extraProperties.put("hibernate.hbm2ddl.auto", "update");
extraProperties.put("hibernate.jdbc.batch_size", "20");
extraProperties.put("hibernate.cache.use_query_cache", "false");
extraProperties.put("hibernate.cache.use_second_level_cache", "false");
extraProperties.put("hibernate.cache.use_structured_entries", "false");
extraProperties.put("hibernate.cache.use_minimal_puts", "false");
extraProperties.put("hibernate.search.model_mapping", LuceneSearchMappingFactory.class.getName());
extraProperties.put("hibernate.search.default.directory_provider", "filesystem");
extraProperties.put("hibernate.search.default.indexBase", "target/lucenefiles");
extraProperties.put("hibernate.search.lucene_version", "LUCENE_CURRENT");
// extraProperties.put("hibernate.search.default.worker.execution", "async");
return extraProperties;
}
/**
* Do some fancy logging to create a nice access log that has details about each incoming request.
*/
public IServerInterceptor loggingInterceptor() {
LoggingInterceptor retVal = new LoggingInterceptor();
retVal.setLoggerName("fhirtest.access");
retVal.setMessageFormat(
"Path[${servletPath}] Source[${requestHeader.x-forwarded-for}] Operation[${operationType} ${operationName} ${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}] ResponseEncoding[${responseEncodingNoDefault}]");
retVal.setLogExceptions(true);
retVal.setErrorMessageFormat("ERROR - ${requestVerb} ${requestUrl}");
return retVal;
}
/**
* This interceptor adds some pretty syntax highlighting in responses when a browser is detected
*/
@Bean(autowire = Autowire.BY_TYPE)
public IServerInterceptor responseHighlighterInterceptor() {
ResponseHighlighterInterceptor retVal = new ResponseHighlighterInterceptor();
return retVal;
}
@Bean(autowire = Autowire.BY_TYPE)
public IServerInterceptor subscriptionSecurityInterceptor() {
SubscriptionsRequireManualActivationInterceptorDstu3 retVal = new SubscriptionsRequireManualActivationInterceptorDstu3();
return retVal;
}
@Bean()
public JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
JpaTransactionManager retVal = new JpaTransactionManager();
retVal.setEntityManagerFactory(entityManagerFactory);
return retVal;
}
}

View File

@ -1,56 +0,0 @@
package ca.uhn.fhir.jpa.cds.example;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.to.FhirTesterMvcConfig;
import ca.uhn.fhir.to.TesterConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
//@formatter:off
/**
* This spring config file configures the web testing module. It serves two
* purposes:
* 1. It imports FhirTesterMvcConfig, which is the spring config for the
* tester itself
* 2. It tells the tester which server(s) to talk to, via the testerConfig()
* method below
*/
@Configuration
@Import(FhirTesterMvcConfig.class)
public class FhirTesterConfig {
/**
* This bean tells the testing webpage which servers it should configure itself
* to communicate with. In this example we configure it to talk to the local
* server, as well as one public server. If you are creating a project to
* deploy somewhere else, you might choose to only put your own server's
* address here.
*
* Note the use of the ${serverBase} variable below. This will be replaced with
* the base URL as reported by the server itself. Often for a simple Tomcat
* (or other container) installation, this will end up being something
* like "http://localhost:8080/hapi-fhir-jpaserver-example". If you are
* deploying your server to a place with a fully qualified domain name,
* you might want to use that instead of using the variable.
*/
@Bean
public TesterConfig testerConfig() {
TesterConfig retVal = new TesterConfig();
retVal
.addServer()
.withId("home")
.withFhirVersion(FhirVersionEnum.DSTU3)
.withBaseUrl("${serverBase}/baseDstu3")
.withName("Local Tester")
.addServer()
.withId("hapi")
.withFhirVersion(FhirVersionEnum.DSTU3)
.withBaseUrl("http://fhirtest.uhn.ca/baseDstu3")
.withName("Public HAPI Test Server");
return retVal;
}
}
//@formatter:on

View File

@ -1,5 +1,5 @@
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee ./xsd/web-app_3_0.xsd">
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee ./xsd/web-app_3_0.xsd" metadata-complete="true">
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
@ -13,7 +13,7 @@
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
ca.uhn.fhir.jpa.cds.example.FhirServerConfig
org.opencds.cqf.config.FhirServerConfigDstu3
</param-value>
</context-param>
@ -34,17 +34,17 @@
</init-param>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>ca.uhn.fhir.jpa.cds.example.FhirTesterConfig</param-value>
<param-value>org.opencds.cqf.config.FhirTesterConfigDstu3</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>fhirServlet</servlet-name>
<servlet-name>cdsServerExample</servlet-name>
<servlet-class>ca.uhn.fhir.jpa.cds.example.CdsServerExample</servlet-class>
<init-param>
<param-name>ImplementationDescription</param-name>
<param-value>FHIR JPA Server</param-value>
<param-value>FHIR CQF Ruler-of-All-Knowledge JPA Server</param-value>
</init-param>
<init-param>
<param-name>FhirVersion</param-name>
@ -53,6 +53,16 @@
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cdsServerExample</servlet-name>
<url-pattern>/baseDstu3/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/tester/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>cdsServicesServlet</servlet-name>
<url-pattern>/cds-services</url-pattern>
@ -63,18 +73,6 @@
<url-pattern>/cds-services/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>fhirServlet</servlet-name>
<url-pattern>/baseDstu3/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- This filters provide support for Cross Origin Resource Sharing (CORS) -->
<filter>
<filter-name>CORS Filter</filter-name>
@ -92,7 +90,7 @@
<init-param>
<description>A comma separated list of allowed headers when making a non simple CORS request.</description>
<param-name>cors.allowed.headers</param-name>
<param-value>X-FHIR-Starter,Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Prefer</param-value>
<param-value>X-FHIR-Starter,Origin,Accept,Authorization,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
</init-param>
<init-param>
<description>A comma separated list non-standard response headers that will be exposed to XHR2 object.</description>
@ -120,5 +118,4 @@
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

View File

@ -39,6 +39,7 @@ public class CdsExampleTests {
@BeforeClass
public static void beforeClass() throws Exception {
// Configure and spin up server
String path = Paths.get("").toAbsolutePath().toString();
ourPort = RandomServerPortProvider.findFreePort();
@ -59,11 +60,10 @@ public class CdsExampleTests {
ourClient = ourCtx.newRestfulGenericClient(ourServerBase);
ourClient.registerInterceptor(new LoggingInterceptor(true));
// Load test data
// Normally, I would use a transaction bundle, but issues with the random ports prevents that...
// So, doing it the old-fashioned way =)
// Load terminology for measure tests (HEDIS measures)
putResource("measure-terminology-bundle.json", "");
// General
// load test data and conversion library for $apply operation tests
putResource("general-practitioner.json", "Practitioner-12208");
putResource("general-patient.json", "Patient-12214");
putResource("general-fhirhelpers-3.json", "FHIRHelpers");
@ -78,31 +78,129 @@ public class CdsExampleTests {
InputStream is = CdsExampleTests.class.getResourceAsStream(resourceFileName);
Scanner scanner = new Scanner(is).useDelimiter("\\A");
String json = scanner.hasNext() ? scanner.next() : "";
IBaseResource resource = ourCtx.newJsonParser().parseResource(json);
ourClient.update(id, resource);
boolean isJson = resourceFileName.endsWith("json");
IBaseResource resource = isJson ? ourCtx.newJsonParser().parseResource(json) : ourCtx.newXmlParser().parseResource(json);
if (resource instanceof Bundle) {
ourClient.transaction().withBundle((Bundle) resource).execute();
}
else {
ourClient.update().resource(resource).withId(id).execute();
}
}
/*
*
* Testing Individual Measure
* This test patient satisfies all the group population criteria for this measure.
*
* */
@Test
public void MeasureProcessingTest() {
putResource("measure-processing-library.json", "col-logic");
putResource("measure-processing-measure.json", "col");
putResource("measure-processing-procedure.json", "Procedure-9");
putResource("measure-processing-condition.json", "Condition-13");
putResource("measure-processing-valueset-1.json", "2.16.840.1.113883.3.464.1003.108.11.1001");
putResource("measure-processing-valueset-2.json", "2.16.840.1.113883.3.464.1003.198.12.1019");
putResource("measure-processing-valueset-3.json", "2.16.840.1.113883.3.464.1003.108.12.1020");
putResource("measure-processing-valueset-4.json", "2.16.840.1.113883.3.464.1003.198.12.1010");
putResource("measure-processing-valueset-5.json", "2.16.840.1.113883.3.464.1003.198.12.1011");
public void PatientMeasureTest() {
// load measure specific test data
putResource("patient-measure-test-bundle.json", "");
Parameters inParams = new Parameters();
inParams.addParameter().setName("patient").setValue(new StringType("Patient-12214"));
inParams.addParameter().setName("startPeriod").setValue(new DateType("2001-01-01"));
inParams.addParameter().setName("endPeriod").setValue(new DateType("2015-03-01"));
inParams.addParameter().setName("patient").setValue(new StringType("Patient/Patient-6529"));
inParams.addParameter().setName("periodStart").setValue(new DateType("2003-01-01"));
inParams.addParameter().setName("periodEnd").setValue(new DateType("2003-12-31"));
Parameters outParams = ourClient
.operation()
.onInstance(new IdDt("Measure", "col"))
.named("$evaluate")
.onInstance(new IdDt("Measure", "measure-asf"))
.named("$evaluate-measure")
.withParameters(inParams)
.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();
for (MeasureReport.MeasureReportGroupComponent group : report.getGroup()) {
for (MeasureReport.MeasureReportGroupPopulationComponent population : group.getPopulation()) {
Assert.assertTrue(population.getCount() > 0);
}
}
}
/*
*
* Testing Patient List Measure
* This test is only testing for valid initial population membership.
* There are 2 patients that reference Practitioner-2520 as their general practitioner.
* However, only one meets the initial population criteria for the measure.
*
* */
@Test
public void PatientListMeasureTest() {
// load measure specific test data
putResource("patient-list-measure-test-bundle.json", "");
Parameters inParams = new Parameters();
inParams.addParameter().setName("reportType").setValue(new StringType("patient-list"));
inParams.addParameter().setName("practitioner").setValue(new StringType("Practitioner/Practitioner-2520"));
inParams.addParameter().setName("periodStart").setValue(new DateType("1997-01-01"));
inParams.addParameter().setName("periodEnd").setValue(new DateType("1997-12-31"));
Parameters outParams = ourClient
.operation()
.onInstance(new IdDt("Measure", "measure-ccs"))
.named("$evaluate-measure")
.withParameters(inParams)
.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();
for (MeasureReport.MeasureReportGroupComponent group : report.getGroup()) {
for (MeasureReport.MeasureReportGroupPopulationComponent population : group.getPopulation()) {
if (population.getCode().getCodingFirstRep().getCode().equals("initial-population")) {
Assert.assertTrue(population.getCount() == 1);
}
}
}
}
/*
*
* Testing Population (or Summary) Measure
* This tests a population of 100 patients. 10 patients satisfy the initial population criteria.
* However, only 2 meet the numerator criteria.
*
* */
@Test
public void PopulationMeasureTest() {
// load measure specific test data
putResource("population-measure-network-bundle.json", "");
putResource("population-measure-patients-bundle.json", "");
putResource("population-measure-test-bundle.json", "");
Parameters inParams = new Parameters();
inParams.addParameter().setName("reportType").setValue(new StringType("population"));
inParams.addParameter().setName("periodStart").setValue(new DateType("1997-01-01"));
inParams.addParameter().setName("periodEnd").setValue(new DateType("1997-12-31"));
Parameters outParams = ourClient
.operation()
.onInstance(new IdDt("Measure", "measure-bcs"))
.named("$evaluate-measure")
.withParameters(inParams)
.useHttpGet()
.execute();
@ -120,16 +218,102 @@ public class CdsExampleTests {
Assert.assertTrue(report.getEvaluatedResources() != null);
for (MeasureReport.MeasureReportGroupComponent group : report.getGroup()) {
if (group.getIdentifier().getValue().equals("history-of-colorectal-cancer")) {
Assert.assertTrue(group.getPopulation().get(0).getCount() > 0);
}
if (group.getIdentifier().getValue().equals("history-of-total-colectomy")) {
Assert.assertTrue(group.getPopulation().get(0).getCount() > 0);
for (MeasureReport.MeasureReportGroupPopulationComponent population : group.getPopulation()) {
Assert.assertTrue(population.getCount() > 0);
}
}
}
/*
*
* Testing Patient View CDS Hook
* This tests whether a patient has had appropriate labs/orders for Breast Cancer detection.
* If not, a suggestion will be returned.
*
* */
@Test
public void PatientViewCdsHooksTest() throws IOException {
// load terminology and test data specific to hook
putResource("cds-codesystems.json", "");
putResource("cds-valuesets.json", "");
putResource("cds-bcs-bundle.json", "");
// Get the CDS Hooks request
InputStream is = this.getClass().getResourceAsStream("cds-bcs-request.json");
Scanner scanner = new Scanner(is).useDelimiter("\\A");
String cdsHooksRequest = scanner.hasNext() ? scanner.next() : "";
cdsHooksRequest = cdsHooksRequest.replace("XXXXX", ourServerBase);
byte[] data = cdsHooksRequest.getBytes("UTF-8");
URL url = new URL("http://localhost:" + ourPort + "/hapi-fhir-jpaserver-cds/cds-services/bcs-decision-support");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("Content-Length", String.valueOf(data.length));
conn.setDoOutput(true);
conn.getOutputStream().write(data);
StringBuilder response = new StringBuilder();
try(Reader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")))
{
for (int i; (i = in.read()) >= 0;) {
response.append((char) i);
}
}
String expected = "{\n" +
" \"cards\": [\n" +
" {\n" +
" \"summary\": \"A Mammogram procedure for the patient is recommended\",\n" +
" \"indicator\": \"warning\",\n" +
" \"detail\": \"The patient has not had a Mammogram procedure in the last 39 months\",\n" +
" \"source\": {},\n" +
" \"suggestions\": [\n" +
" {\n" +
" \"label\": \"Mammogram request\",\n" +
" \"actions\": [\n" +
" {\n" +
" \"type\": \"create\",\n" +
" \"description\": \"The patient has not had a Mammogram procedure in the last 39 months\",\n" +
" \"resource\": {\n" +
" \"resourceType\": \"ProcedureRequest\",\n" +
" \"status\": \"draft\",\n" +
" \"intent\": \"order\",\n" +
" \"code\": {\n" +
" \"coding\": [\n" +
" {\n" +
" \"system\": \"http://www.ama-assn.org/go/cpt\",\n" +
" \"code\": \"77056\",\n" +
" \"display\": \"Mammography; bilateral\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" \"subject\": {\n" +
" \"reference\": \"Patient/Patient-6535\"\n" +
" }\n" +
" }\n" +
" }\n" +
" ]\n" +
" }\n" +
" ]\n" +
" }\n" +
" ]\n" +
"}\n";
String withoutID = response.toString().replaceAll("\"id\":.*\\s", "");
Assert.assertTrue(
withoutID.replaceAll("\\s+", "")
.equals(expected.replaceAll("\\s+", ""))
);
}
/*
*
* Testing $apply operation for a PlanDefinition resource
* This test applies a PlanDefinition and returns a CarePlan with a dynamic property populated.
*
* */
@Test
public void PlanDefinitionApplyTest() throws ClassNotFoundException {
putResource("plandefinition-apply-library.json", "plandefinitionApplyTest");
@ -159,6 +343,12 @@ public class CdsExampleTests {
Assert.assertTrue(carePlan.getTitle().equals("This is a dynamic definition!"));
}
/*
*
* Testing $apply operation for an ActivityDefinition resource
* This test applies an ActivityDefinition and returns a ProcedureRequest with a dynamic property populated.
*
* */
@Test
public void ActivityDefinitionApplyTest() {
putResource("activitydefinition-apply-library.json", "activityDefinitionApplyTest");
@ -187,52 +377,6 @@ public class CdsExampleTests {
Assert.assertTrue(procedureRequest.getDoNotPerform());
}
//@Test
public void CdsHooksPatientViewTest() throws IOException {
putResource("cds-bcs-library.json", "patient-view");
putResource("cds-bcs-patient.json", "Patient-6532");
putResource("cds-bcs-plandefinition.json", "bcs-decision-support");
putResource("cds-bcs-activitydefinition.json", "mammogram-service-request");
// Get the CDS Hooks request
InputStream is = this.getClass().getResourceAsStream("cds-bcs-request.json");
Scanner scanner = new Scanner(is).useDelimiter("\\A");
String cdsHooksRequest = scanner.hasNext() ? scanner.next() : "";
byte[] data = cdsHooksRequest.getBytes("UTF-8");
URL url = new URL("http://localhost:" + ourPort + "/hapi-fhir-jpaserver-cds/cds-services/bcs-decision-support");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("Content-Length", String.valueOf(data.length));
conn.setDoOutput(true);
conn.getOutputStream().write(data);
StringBuilder response = new StringBuilder();
try(Reader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")))
{
for (int i; (i = in.read()) >= 0;) {
response.append((char) i);
}
}
String expected = "{\n" +
" \"cards\": [\n" +
" {\n" +
" \"summary\": \"High risk for opioid overdose - taper now\",\n" +
" \"indicator\": \"warning\",\n" +
" \"detail\": \"Total morphine milligram equivalent (MME) is 20200.700mg/d. Taper to less than 50.\"\n" +
" }\n" +
" ]\n" +
"}";
Assert.assertTrue(
response.toString().replaceAll("\\s+", "")
.equals(expected.replaceAll("\\s+", ""))
);
}
}
class RandomServerPortProvider {

View File

@ -1,10 +1,6 @@
{
"resourceType": "ActivityDefinition",
"id": "ad-apply-example",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">ActivityDefinition $apply operation example.</div>"
},
"status": "draft",
"description": "This is a test.",
"library": [
@ -29,4 +25,4 @@
"expression": "activityDefinitionApplyTest.\"Dynamic doNotPerform Setting\""
}
]
}
}

View File

@ -1,37 +0,0 @@
{
"resourceType": "ActivityDefinition",
"id": "mammogram-service-request",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Create ServiceRequest for Mammogrm Procedure</div>"
},
"status": "draft",
"description": "Create ServiceRequest for Mammogram Procedure",
"kind": "ProcedureRequest",
"code": {
"coding": [
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "77056",
"display": "Mammography; bilateral"
}
]
},
"timingTiming": {
"_event": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/cqif-basic-cqlExpression",
"valueString": "Now()"
}
]
}
]
},
"participant": [
{
"type": "practitioner"
}
]
}

View File

@ -1,96 +0,0 @@
{
"resourceType": "Patient",
"id": "Patient-6532",
"extension": [
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/Race",
"code": "2106-3",
"display": "White"
}
]
}
},
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/Ethnicity",
"code": "2186-5",
"display": "Not Hispanic or Latino"
}
]
}
},
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-religion",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/ReligiousAffiliation",
"code": "1041",
"display": "Roman Catholic Church"
}
]
}
}
],
"identifier": [
{
"use": "official",
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/identifier-type",
"code": "SB",
"display": "Social Beneficiary Identifier"
}
],
"text": "US Social Security Number"
},
"system": "http://hl7.org/fhir/sid/us-ssn",
"value": "000006532"
}
],
"active": true,
"name": [
{
"family": "Brandt",
"given": [
"Edith",
"Elaine"
]
}
],
"telecom": [
{
"system": "phone",
"value": "616-555-1082",
"use": "home"
},
{
"system": "phone",
"value": "616-555-1211",
"use": "mobile"
}
],
"gender": "female",
"birthDate": "1987-07-16",
"address": [
{
"use": "home",
"type": "postal",
"line": [
"893 N Elm Drive"
],
"city": "Grand Rapids",
"district": "Kent County",
"state": "MI",
"postalCode": "49504"
}
]
}

View File

@ -1,33 +0,0 @@
{
"resourceType": "PlanDefinition",
"id": "bcs-decision-support",
"status": "draft",
"library": {
"reference": "Library/patient-view"
},
"action": [
{
"condition": [
{
"kind": "applicability",
"language": "text/cql",
"expression": "Does Patient Qualify?"
}
],
"action": [
{
"condition": [
{
"kind": "applicability",
"language": "text/cql",
"expression": "Needs Mammogram"
}
],
"definition": {
"reference": "ActivityDefinition/mammogram-service-request"
}
}
]
}
]
}

View File

@ -1,9 +1,9 @@
{
"hookInstance": "d1577c69-dfbe-44ad-ba6d-3e05e953b2ea",
"fhirServer": "https://sb-fhir-dstu2.smarthealthit.org/smartdstu2/open",
"fhirServer": "XXXXX",
"hook": "patient-view",
"user": "Practitioner/example",
"context": [],
"patient": "Patient/Patient-6535",
"prefetch": {}
}
"context": {
"patientId": "Patient/Patient-6535"
}
}

View File

@ -1,69 +1,6 @@
{
"resourceType": "Patient",
"id": "Patient-12214",
"meta": {
"versionId": "1",
"lastUpdated": "2017-07-17T16:34:10.814+00:00"
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">2 <b>N GERIATRIC </b>Jr</div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>7f3672feb3b54789953e012d8aef5246</td></tr><tr><td>Address</td><td><span>202 Burlington Rd. </span><br/><span>Bedford </span><span>MA </span></td></tr><tr><td>Date of birth</td><td><span>07 May 1946</span></td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/us-core-race",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/Race",
"code": "2106-3",
"display": "White"
}
]
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/us-core-ethnicity",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/Ethnicity",
"code": "2186-5",
"display": "Not Hispanic or Latino"
}
]
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/us-core-religion",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/ReligiousAffiliation",
"code": "1007",
"display": "Atheism"
}
]
}
}
],
"identifier": [
{
"use": "official",
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/identifier-type",
"code": "SB",
"display": "Social Beneficiary Identifier"
}
],
"text": "Michigan Common Key Service Identifier"
},
"system": "http://mihin.org/fhir/cks",
"value": "7f3672feb3b54789953e012d8aef5246"
}
],
"active": false,
"name": [
{
@ -86,17 +23,6 @@
"system": "phone",
"value": "586-555-0297",
"use": "work"
},
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/us-core-direct",
"valueBoolean": true
}
],
"system": "email",
"value": "2.N.Geriatric@direct.mihintest.org",
"use": "home"
}
],
"gender": "male",
@ -111,4 +37,4 @@
"postalCode": "01730"
}
]
}
}

View File

@ -1,55 +1,6 @@
{
"resourceType": "Practitioner",
"id": "Practitioner-12208",
"meta": {
"versionId": "1",
"lastUpdated": "2017-07-17T16:34:10.814+00:00"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/us-core-race",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/Race",
"code": "2056-0",
"display": "Black"
}
]
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/us-core-ethnicity",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/Ethnicity",
"code": "2186-5",
"display": "Not Hispanic or Latino"
}
]
}
},
{
"url": "http://gov.onc.fhir.extension.taxonomy",
"valueCodeableConcept": {
"coding": [
{
"system": "http://org.nucc.taxonomy",
"code": "208D00000X",
"display": "General Practice"
}
]
}
},
{
"url": "http://org.mihin.fhir.extension.electronic-service",
"valueReference": {
"reference": "ElectronicService/ElectronicService-2415",
"display": "Jay.M.Sawyer@direct.mihintest.org"
}
}
],
"identifier": [
{
"use": "official",
@ -163,11 +114,7 @@
"display": "Medical Doctor"
}
]
},
"issuer": {
"reference": "Organization/Organization-2000",
"display": "Michigan Department of Licensing and Regulatory Affairs"
}
}
]
}
}

View File

@ -1,319 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<library xmlns="urn:hl7-org:elm:r1" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fhir="http://hl7.org/fhir" xmlns:a="urn:hl7-org:cql-annotations:r1">
<identifier id="COL" version="1"/>
<schemaIdentifier id="urn:hl7-org:elm" version="r1"/>
<usings>
<def localIdentifier="System" uri="urn:hl7-org:elm-types:r1"/>
<def localIdentifier="FHIR" uri="http://hl7.org/fhir" version="1.6"/>
</usings>
<parameters>
<def name="MeasurementPeriod" accessLevel="Public">
<parameterTypeSpecifier xsi:type="IntervalTypeSpecifier">
<pointType name="t:DateTime" xsi:type="NamedTypeSpecifier"/>
</parameterTypeSpecifier>
</def>
</parameters>
<codeSystems>
<def name="CPT" id="urn:oid:2.16.840.1.113883.6.12" accessLevel="Public"/>
<def name="SNOMED-CT" id="urn:oid:2.16.840.1.113883.6.96" accessLevel="Public"/>
<def name="LOINC" id="http://loinc.org" accessLevel="Public"/>
</codeSystems>
<valueSets>
<def name="Malignant Neoplasm of Colon" id="2.16.840.1.113883.3.464.1003.108.11.1001" accessLevel="Public"/>
<def name="Total Colectomy" id="2.16.840.1.113883.3.464.1003.198.12.1019" accessLevel="Public"/>
<def name="Colonoscopy" id="2.16.840.1.113883.3.464.1003.108.12.1020" accessLevel="Public"/>
<def name="Flexible Sigmoidoscopy" id="2.16.840.1.113883.3.464.1003.198.12.1010" accessLevel="Public"/>
<def name="Fecal Occult Blood Test (FOBT)" id="2.16.840.1.113883.3.464.1003.198.12.1011" accessLevel="Public"/>
</valueSets>
<statements>
<def name="Patient" context="Patient">
<expression xsi:type="SingletonFrom">
<operand dataType="fhir:Patient" xsi:type="Retrieve"/>
</expression>
</def>
<def name="Lookback Interval One Year" context="Patient" accessLevel="Public">
<expression lowClosed="true" highClosed="true" xsi:type="Interval">
<low xsi:type="Subtract">
<operand xsi:type="Start">
<operand name="MeasurementPeriod" xsi:type="ParameterRef"/>
</operand>
<operand value="1" unit="years" xsi:type="Quantity"/>
</low>
<high xsi:type="End">
<operand name="MeasurementPeriod" xsi:type="ParameterRef"/>
</high>
</expression>
</def>
<def name="Lookback Interval Five Years" context="Patient" accessLevel="Public">
<expression lowClosed="true" highClosed="true" xsi:type="Interval">
<low xsi:type="Subtract">
<operand xsi:type="Start">
<operand name="MeasurementPeriod" xsi:type="ParameterRef"/>
</operand>
<operand value="5" unit="years" xsi:type="Quantity"/>
</low>
<high xsi:type="End">
<operand name="MeasurementPeriod" xsi:type="ParameterRef"/>
</high>
</expression>
</def>
<def name="Lookback Interval Ten Years" context="Patient" accessLevel="Public">
<expression lowClosed="true" highClosed="true" xsi:type="Interval">
<low xsi:type="Subtract">
<operand xsi:type="Start">
<operand name="MeasurementPeriod" xsi:type="ParameterRef"/>
</operand>
<operand value="10" unit="years" xsi:type="Quantity"/>
</low>
<high xsi:type="End">
<operand name="MeasurementPeriod" xsi:type="ParameterRef"/>
</high>
</expression>
</def>
<def name="In Demographic" context="Patient" accessLevel="Public">
<expression xsi:type="GreaterOrEqual">
<operand precision="Year" xsi:type="CalculateAgeAt">
<operand path="birthDate.value" xsi:type="Property">
<source name="Patient" xsi:type="ExpressionRef"/>
</operand>
<operand xsi:type="Start">
<operand name="MeasurementPeriod" xsi:type="ParameterRef"/>
</operand>
</operand>
<operand valueType="t:Integer" value="50" xsi:type="Literal"/>
</expression>
</def>
<def name="Hx Colorectal Cancer" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="C">
<expression dataType="fhir:Condition" codeProperty="code" xsi:type="Retrieve">
<codes name="Malignant Neoplasm of Colon" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="clinicalStatus" scope="C" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="active" xsi:type="Literal"/>
</operand>
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="verificationStatus" scope="C" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="confirmed" xsi:type="Literal"/>
</operand>
</where>
</expression>
</def>
<def name="Hx Total Colectomy" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="T">
<expression dataType="fhir:Procedure" codeProperty="code" xsi:type="Retrieve">
<codes name="Total Colectomy" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="T" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="completed" xsi:type="Literal"/>
</where>
</expression>
</def>
<def name="Colonoscopy Performed" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="C">
<expression dataType="fhir:Procedure" codeProperty="code" xsi:type="Retrieve">
<codes name="Colonoscopy" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="C" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="completed" xsi:type="Literal"/>
</operand>
<operand xsi:type="In">
<operand path="value" xsi:type="Property">
<source path="end" xsi:type="Property">
<source path="performedPeriod" scope="C" xsi:type="Property"/>
</source>
</operand>
<operand name="Lookback Interval Ten Years" xsi:type="ExpressionRef"/>
</operand>
</where>
</expression>
</def>
<def name="Colonoscopy Results" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="C">
<expression dataType="fhir:Observation" codeProperty="code" xsi:type="Retrieve">
<codes name="Colonoscopy" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="C" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="final" xsi:type="Literal"/>
</operand>
<operand xsi:type="In">
<operand path="value" xsi:type="Property">
<source path="effectiveDateTime" scope="C" xsi:type="Property"/>
</operand>
<operand name="Lookback Interval Ten Years" xsi:type="ExpressionRef"/>
</operand>
</where>
</expression>
</def>
<def name="Sigmoidoscopy Procedure" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="S">
<expression dataType="fhir:Procedure" codeProperty="code" xsi:type="Retrieve">
<codes name="Flexible Sigmoidoscopy" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="S" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="completed" xsi:type="Literal"/>
</operand>
<operand xsi:type="In">
<operand path="value" xsi:type="Property">
<source path="end" xsi:type="Property">
<source path="performedPeriod" scope="S" xsi:type="Property"/>
</source>
</operand>
<operand name="Lookback Interval Five Years" xsi:type="ExpressionRef"/>
</operand>
</where>
</expression>
</def>
<def name="Sigmoidoscopy Observation" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="O">
<expression dataType="fhir:Observation" codeProperty="code" xsi:type="Retrieve">
<codes name="Flexible Sigmoidoscopy" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="O" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="final" xsi:type="Literal"/>
</operand>
<operand xsi:type="In">
<operand path="value" xsi:type="Property">
<source path="effectiveDateTime" scope="O" xsi:type="Property"/>
</operand>
<operand name="Lookback Interval Five Years" xsi:type="ExpressionRef"/>
</operand>
</where>
</expression>
</def>
<def name="FOBT Procedure" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="F">
<expression dataType="fhir:Procedure" codeProperty="code" xsi:type="Retrieve">
<codes name="Fecal Occult Blood Test (FOBT)" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="F" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="completed" xsi:type="Literal"/>
</operand>
<operand xsi:type="In">
<operand path="value" xsi:type="Property">
<source path="end" xsi:type="Property">
<source path="performedPeriod" scope="F" xsi:type="Property"/>
</source>
</operand>
<operand name="Lookback Interval One Year" xsi:type="ExpressionRef"/>
</operand>
</where>
</expression>
</def>
<def name="FOBT Observation" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="O">
<expression dataType="fhir:Observation" codeProperty="code" xsi:type="Retrieve">
<codes name="Fecal Occult Blood Test (FOBT)" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="O" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="final" xsi:type="Literal"/>
</operand>
<operand xsi:type="In">
<operand path="value" xsi:type="Property">
<source path="effectiveDateTime" scope="O" xsi:type="Property"/>
</operand>
<operand name="Lookback Interval One Year" xsi:type="ExpressionRef"/>
</operand>
</where>
</expression>
</def>
<def name="Colonoscopy Procedure" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="C">
<expression dataType="fhir:Procedure" codeProperty="code" xsi:type="Retrieve">
<codes name="Colonoscopy" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="C" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="completed" xsi:type="Literal"/>
</operand>
<operand xsi:type="In">
<operand path="value" xsi:type="Property">
<source path="end" xsi:type="Property">
<source path="performedPeriod" scope="C" xsi:type="Property"/>
</source>
</operand>
<operand name="Lookback Interval Ten Years" xsi:type="ExpressionRef"/>
</operand>
</where>
</expression>
</def>
<def name="Colonoscopy Observation" context="Patient" accessLevel="Public">
<expression xsi:type="Query">
<source alias="O">
<expression dataType="fhir:Observation" codeProperty="code" xsi:type="Retrieve">
<codes name="Colonoscopy" xsi:type="ValueSetRef"/>
</expression>
</source>
<where xsi:type="And">
<operand xsi:type="Equal">
<operand path="value" xsi:type="Property">
<source path="status" scope="O" xsi:type="Property"/>
</operand>
<operand valueType="t:String" value="final" xsi:type="Literal"/>
</operand>
<operand xsi:type="In">
<operand path="value" xsi:type="Property">
<source path="effectiveDateTime" scope="O" xsi:type="Property"/>
</operand>
<operand name="Lookback Interval Ten Years" xsi:type="ExpressionRef"/>
</operand>
</where>
</expression>
</def>
</statements>
</library>

View File

@ -1,138 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Measure xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../schema/measure.xsd">
<id value="col"/>
<text>
<status value="additional"/>
<div xmlns="http://www.w3.org/1999/xhtml">
Cohort definition for Colorectal Cancer Screening.
</div>
</text>
<identifier>
<use value="official"/>
<system value="http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/payer-extract"/>
<value value="COL"/>
</identifier>
<version value="1.0.0"/>
<title value="Colorectal Cancer Screening. Cohort Definition"/>
<status value="active"/>
<experimental value="true"/>
<description value="Colorectal Cancer Screening. Cohort Definition"/>
<topic>
<coding>
<system value="http://hl7.org/fhir/c80-doc-typecodes"/>
<code value="57024-2"/>
</coding>
</topic>
<library>
<reference value="Library/col-logic"/>
</library>
<scoring value="cohort"/>
<group>
<identifier>
<value value="in-demographic"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="in-demographic"/>
</identifier>
<criteria value="In Demographic"/>
</population>
</group>
<group>
<identifier>
<value value="history-of-colorectal-cancer"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="history-of-colorectal-cancer"/>
</identifier>
<criteria value="Hx Colorectal Cancer"/>
</population>
</group>
<group>
<identifier>
<value value="history-of-total-colectomy"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="history-of-total-colectomy"/>
</identifier>
<criteria value="Hx Total Colectomy"/>
</population>
</group>
<group>
<identifier>
<value value="colonoscopy-performed"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="colonoscopy-performed"/>
</identifier>
<criteria value="Colonoscopy Performed"/>
</population>
</group>
<group>
<identifier>
<value value="colonoscopy-results"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="colonoscopy-results"/>
</identifier>
<criteria value="Colonoscopy Results"/>
</population>
</group>
<group>
<identifier>
<value value="sigmoidoscopy-procedure"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="sigmoidoscopy-procedure"/>
</identifier>
<criteria value="Sigmoidoscopy Procedure"/>
</population>
</group>
<group>
<identifier>
<value value="sigmoidoscopy-observation"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="sigmoidoscopy-observation"/>
</identifier>
<criteria value="Sigmoidoscopy Observation"/>
</population>
</group>
<group>
<identifier>
<value value="fobt-procedure"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="fobt-procedure"/>
</identifier>
<criteria value="FOBT Procedure"/>
</population>
</group>
<group>
<identifier>
<value value="fobt-observation"/>
</identifier>
<population>
<type value="initial-population"/>
<identifier>
<value value="fobt-observation"/>
</identifier>
<criteria value="FOBT Observation"/>
</population>
</group>
</Measure>

View File

@ -1,49 +0,0 @@
{
"resourceType": "Condition",
"id": "Condition-13",
"meta": {
"versionId": "1",
"lastUpdated": "2017-09-09T21:52:17.035-06:00"
},
"extension": [
{
"url": "http://mihin.org/fhir/templateId",
"valueString": "2.16.840.1.113883.10.20.22.4.3"
},
{
"url": "http://mihin.org/fhir/templateId",
"valueString": "2.16.840.1.113883.10.20.24.3.137"
}
],
"clinicalStatus": "active",
"verificationStatus": "confirmed",
"category": [
{
"coding": [
{
"system": "http://hl7.org/fhir/condition-category",
"code": "diagnosis",
"display": "Diagnosis"
}
],
"text": "This is a judgment made by a healthcare provider that the patient has a particular disease or condition"
}
],
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "363414004"
}
],
"text": "Diagnosis: Malignant Neoplasm Of Colon"
},
"subject": {
"reference": "Patient/Patient-12214",
"display": "2 N Geriatric Jr"
},
"asserter": {
"reference": "Practitioner/Practitioner-12208",
"display": "Jay McCann Sawyer MD"
}
}

View File

@ -1,158 +0,0 @@
{
"resourceType": "Measure",
"id": "col",
"meta": {
"versionId": "1",
"lastUpdated": "2017-09-09T21:26:03.890-06:00"
},
"text": {
"status": "additional",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n Cohort definition for Colorectal Cancer Screening.\n </div>"
},
"identifier": [
{
"use": "official",
"system": "http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/payer-extract",
"value": "COL"
}
],
"version": "1.0.0",
"title": "Colorectal Cancer Screening. Cohort Definition",
"status": "active",
"experimental": true,
"description": "Colorectal Cancer Screening. Cohort Definition",
"topic": [
{
"coding": [
{
"system": "http://hl7.org/fhir/c80-doc-typecodes",
"code": "57024-2"
}
]
}
],
"library": [
{
"reference": "Library/col-logic"
}
],
"group": [
{
"identifier": {
"value": "in-demographic"
},
"population": [
{
"identifier": {
"value": "in-demographic"
},
"criteria": "In Demographic"
}
]
},
{
"identifier": {
"value": "history-of-colorectal-cancer"
},
"population": [
{
"identifier": {
"value": "history-of-colorectal-cancer"
},
"criteria": "Hx Colorectal Cancer"
}
]
},
{
"identifier": {
"value": "history-of-total-colectomy"
},
"population": [
{
"identifier": {
"value": "history-of-total-colectomy"
},
"criteria": "Hx Total Colectomy"
}
]
},
{
"identifier": {
"value": "colonoscopy-performed"
},
"population": [
{
"identifier": {
"value": "colonoscopy-performed"
},
"criteria": "Colonoscopy Performed"
}
]
},
{
"identifier": {
"value": "colonoscopy-results"
},
"population": [
{
"identifier": {
"value": "colonoscopy-results"
},
"criteria": "Colonoscopy Results"
}
]
},
{
"identifier": {
"value": "sigmoidoscopy-procedure"
},
"population": [
{
"identifier": {
"value": "sigmoidoscopy-procedure"
},
"criteria": "Sigmoidoscopy Procedure"
}
]
},
{
"identifier": {
"value": "sigmoidoscopy-observation"
},
"population": [
{
"identifier": {
"value": "sigmoidoscopy-observation"
},
"criteria": "Sigmoidoscopy Observation"
}
]
},
{
"identifier": {
"value": "fobt-procedure"
},
"population": [
{
"identifier": {
"value": "fobt-procedure"
},
"criteria": "FOBT Procedure"
}
]
},
{
"identifier": {
"value": "fobt-observation"
},
"population": [
{
"identifier": {
"value": "fobt-observation"
},
"criteria": "FOBT Observation"
}
]
}
]
}

View File

@ -1,68 +0,0 @@
{
"resourceType": "Procedure",
"id": "Procedure-9",
"meta": {
"versionId": "1",
"lastUpdated": "2017-09-09T21:52:35.933-06:00"
},
"extension": [
{
"url": "http://mihin.org/fhir/templateId",
"valueString": "2.16.840.1.113883.10.20.24.3.64"
},
{
"url": "http://mihin.org/fhir/templateId",
"valueString": "2.16.840.1.113883.10.20.22.4.14"
}
],
"identifier": [
{
"system": "http://hl7.org/fhir/identifier",
"value": "1.3.6.1.4.1.115:579f4eb5aeac500a550c5c7b"
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Surgical Procedure"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "36192008"
}
],
"text": "Procedure, Performed: Total Colectomy"
},
"subject": {
"reference": "Patient/Patient-12214",
"display": "2 N Geriatric Jr"
},
"performedPeriod": {
"start": "2010-10-12T06:00:00-04:00",
"end": "2010-10-12T08:15:00-04:00"
},
"performer": [
{
"role": {
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/performer-role",
"code": "112247003",
"display": "Medical doctor (occupation)"
}
]
},
"actor": {
"reference": "Practitioner/Practitioner-12208",
"display": "Jay McCann Sawyer MD"
}
}
]
}

View File

@ -1,416 +0,0 @@
{
"resourceType": "ValueSet",
"id": "2.16.840.1.113883.3.464.1003.108.11.1001",
"meta": {
"versionId": "3",
"lastUpdated": "2017-07-25T09:54:33.579+00:00"
},
"url": "http://measure.eval.kanvix.com/cqf-ruler/baseDstu3/Valueset/2.16.840.1.113883.3.464.1003.108.11.1001",
"name": "Malignant Neoplasm of Colon (SNOMED CT) eCQM",
"status": "active",
"compose": {
"include": [
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"concept": [
{
"code": "187758006"
},
{
"code": "109838007"
},
{
"code": "1701000119104"
},
{
"code": "187757001"
},
{
"code": "269533000"
},
{
"code": "269544008"
},
{
"code": "285312008"
},
{
"code": "285611007"
},
{
"code": "301756000"
},
{
"code": "312111009"
},
{
"code": "312112002"
},
{
"code": "312113007"
},
{
"code": "312114001"
},
{
"code": "312115000"
},
{
"code": "314965007"
},
{
"code": "315058005"
},
{
"code": "363406005"
},
{
"code": "363407001"
},
{
"code": "363408006"
},
{
"code": "363409003"
},
{
"code": "363410008"
},
{
"code": "363412000"
},
{
"code": "363413005"
},
{
"code": "363414004"
},
{
"code": "363510005"
},
{
"code": "425178004"
},
{
"code": "449218003"
},
{
"code": "93683002"
},
{
"code": "93761005"
},
{
"code": "93771007"
},
{
"code": "93826009"
},
{
"code": "93980002"
},
{
"code": "94006002"
},
{
"code": "94072004"
},
{
"code": "94105000"
},
{
"code": "94179005"
},
{
"code": "94260004"
},
{
"code": "94271003"
},
{
"code": "94328005"
},
{
"code": "94509004"
},
{
"code": "94538001"
},
{
"code": "94604000"
},
{
"code": "94643001"
}
]
}
]
},
"expansion": {
"identifier": "http://open-api2.hspconsortium.org/payerextract/data/ValueSet/2.16.840.1.113883.3.464.1003.108.11.1001",
"timestamp": "2016-09-19T14:05:21.939-04:00",
"total": 43,
"offset": 0,
"contains": [
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "425178004",
"display": "Adenocarcinoma of rectosigmoid junction"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "301756000",
"display": "Adenocarcinoma of sigmoid colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "312111009",
"display": "Carcinoma of ascending colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "269533000",
"display": "Carcinoma of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "312113007",
"display": "Carcinoma of descending colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "312114001",
"display": "Carcinoma of hepatic flexure"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "285312008",
"display": "Carcinoma of sigmoid colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "312115000",
"display": "Carcinoma of splenic flexure"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "269544008",
"display": "Carcinoma of the rectosigmoid junction"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "312112002",
"display": "Carcinoma of transverse colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "315058005",
"display": "Lynch syndrome"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "314965007",
"display": "Local recurrence of malignant tumor of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "449218003",
"display": "Lymphoma of sigmoid colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "187758006",
"display": "Malignant neoplasm of other specified sites of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "187757001",
"display": "Malignant neoplasm, overlapping lesion of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363412000",
"display": "Malignant tumor of ascending colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363406005",
"display": "Malignant tumor of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363409003",
"display": "Malignant tumor of descending colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363407001",
"display": "Malignant tumor of hepatic flexure"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363510005",
"display": "Malignant tumor of large intestine"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363414004",
"display": "Malignant tumor of rectosigmoid junction"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363410008",
"display": "Malignant tumor of sigmoid colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363413005",
"display": "Malignant tumor of splenic flexure"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "363408006",
"display": "Malignant tumor of transverse colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "285611007",
"display": "Metastasis to colon of unknown primary"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "109838007",
"display": "Overlapping malignant neoplasm of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "1701000119104",
"display": "Primary adenocarcinoma of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "93683002",
"display": "Primary malignant neoplasm of ascending colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "93761005",
"display": "Primary malignant neoplasm of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "93771007",
"display": "Primary malignant neoplasm of descending colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "93826009",
"display": "Primary malignant neoplasm of hepatic flexure of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "93980002",
"display": "Primary malignant neoplasm of rectosigmoid junction"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94006002",
"display": "Primary malignant neoplasm of sigmoid colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94072004",
"display": "Primary malignant neoplasm of splenic flexure of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94105000",
"display": "Primary malignant neoplasm of transverse colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94179005",
"display": "Secondary malignant neoplasm of ascending colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94260004",
"display": "Secondary malignant neoplasm of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94271003",
"display": "Secondary malignant neoplasm of descending colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94328005",
"display": "Secondary malignant neoplasm of hepatic flexure of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94509004",
"display": "Secondary malignant neoplasm of rectosigmoid junction"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94538001",
"display": "Secondary malignant neoplasm of sigmoid colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94604000",
"display": "Secondary malignant neoplasm of splenic flexure of colon"
},
{
"system": "http://snomed.info/sct",
"version": "2015.03.14AB",
"code": "94643001",
"display": "Secondary malignant neoplasm of transverse colon"
}
]
}
}

View File

@ -1,181 +0,0 @@
{
"resourceType": "ValueSet",
"id": "2.16.840.1.113883.3.464.1003.198.12.1019",
"meta": {
"versionId": "3",
"lastUpdated": "2017-07-25T09:54:33.579+00:00"
},
"url": "http://measure.eval.kanvix.com/cql-measure-processor/baseDstu3/Valueset/2.16.840.1.113883.3.464.1003.198.12.1019 ",
"name": "Total Colectomy eMeasure",
"compose": {
"include": [
{
"system": "http://www.ama-assn.org/go/cpt",
"version": "2016.1.15AA",
"concept": [
{
"code": "44156"
},
{
"code": "44158"
},
{
"code": "44157"
},
{
"code": "44155"
},
{
"code": "44151"
},
{
"code": "44150"
},
{
"code": "44211"
},
{
"code": "44212"
},
{
"code": "44210"
},
{
"code": "44153"
},
{
"code": "44152"
}
]
},
{
"system": "http://snomed.info/sct",
"version": "2015.09.15AA",
"filter": [
{
"property": "concept",
"op": "is-a",
"value": "26390003"
}
]
}
]
},
"expansion": {
"timestamp": "2016-09-20T12:32:19.296-04:00",
"total": 22,
"offset": 0,
"contains": [
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44156",
"display": "Colectomy, total, abdominal, with proctectomy; with continent ileostomy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44158",
"display": "Colectomy, total, abdominal, with proctectomy; with ileoanal anastomosis, creation of ileal reservoir (S or J), includes loop ileostomy, and rectal mucosectomy, when performed"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44157",
"display": "Colectomy, total, abdominal, with proctectomy; with ileoanal anastomosis, includes loop ileostomy, and rectal mucosectomy, when performed"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44155",
"display": "Colectomy, total, abdominal, with proctectomy; with ileostomy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44151",
"display": "Colectomy, total, abdominal, without proctectomy; with continent ileostomy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44150",
"display": "Colectomy, total, abdominal, without proctectomy; with ileostomy or ileoproctostomy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44153",
"display": "Colectomy, total, abdominal, without proctectomy; with rectal mucosectomy, ileoanal anastomosis, creation of ileal reservoir (S or J), with or without loop ileostomy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44152",
"display": "Colectomy, total, abdominal, without proctectomy; with rectal mucosectomy, ileoanal anastomosis, with or without loop ileostomy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44211",
"display": "Laparoscopy, surgical; colectomy, total, abdominal, with proctectomy, with ileoanal anastomosis, creation of ileal reservoir (S or J), with loop ileostomy, includes rectal mucosectomy, when performed"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44212",
"display": "Laparoscopy, surgical; colectomy, total, abdominal, with proctectomy, with ileostomy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44210",
"display": "Laparoscopy, surgical; colectomy, total, abdominal, without proctectomy, with ileostomy or ileoproctostomy"
},
{
"system": "http://snomed.info/sct",
"code": "303401008",
"display": "Parks panproctocolectomy, anastomosis of ileum to anus and creation of pouch"
},
{
"system": "http://snomed.info/sct",
"code": "235331003",
"display": "Restorative proctocolectomy"
},
{
"system": "http://snomed.info/sct",
"code": "36192008",
"display": "Total abdominal colectomy with ileoproctostomy"
},
{
"system": "http://snomed.info/sct",
"code": "456004",
"display": "Total abdominal colectomy with ileostomy"
},
{
"system": "http://snomed.info/sct",
"code": "44751009",
"display": "Total abdominal colectomy with proctectomy and continent ileostomy"
},
{
"system": "http://snomed.info/sct",
"code": "31130001",
"display": "Total abdominal colectomy with proctectomy and ileostomy"
},
{
"system": "http://snomed.info/sct",
"code": "80294005",
"display": "Total abdominal colectomy with rectal mucosectomy and ileoanal anastomosis"
},
{
"system": "http://snomed.info/sct",
"code": "26390003",
"display": "Total colectomy"
},
{
"system": "http://snomed.info/sct",
"code": "307666008",
"display": "Total colectomy and ileostomy"
},
{
"system": "http://snomed.info/sct",
"code": "307669001",
"display": "Total colectomy, ileostomy and closure of rectal stump"
},
{
"system": "http://snomed.info/sct",
"code": "307667004",
"display": "Total colectomy, ileostomy and rectal mucous fistula"
}
]
}
}

View File

@ -1,421 +0,0 @@
{
"resourceType": "ValueSet",
"id": "2.16.840.1.113883.3.464.1003.108.12.1020",
"meta": {
"versionId": "3",
"lastUpdated": "2017-07-25T09:54:33.579+00:00"
},
"url": "http://measure.eval.kanvix.com/cql-measure-processor/baseDstu3/Valueset/2.16.840.1.113883.3.464.1003.108.12.1020",
"name": "Colonoscopy eMeasure",
"compose": {
"include": [
{
"system": "http://www.ama-assn.org/go/cpt",
"version": "2015.1.14AB",
"concept": [
{
"code": "44388"
},
{
"code": "44393"
},
{
"code": "44389"
},
{
"code": "44391"
},
{
"code": "44390"
},
{
"code": "44392"
},
{
"code": "44394"
},
{
"code": "44397"
},
{
"code": "45378"
},
{
"code": "45383"
},
{
"code": "45380"
},
{
"code": "45382"
},
{
"code": "45386"
},
{
"code": "45381"
},
{
"code": "45391"
},
{
"code": "45379"
},
{
"code": "45384"
},
{
"code": "45385"
},
{
"code": "45387"
},
{
"code": "45392"
},
{
"code": "45355"
},
{
"code": "44401"
},
{
"code": "44402"
},
{
"code": "44403"
},
{
"code": "44404"
},
{
"code": "44405"
},
{
"code": "44406"
},
{
"code": "44407"
},
{
"code": "44408"
},
{
"code": "45388"
},
{
"code": "45389"
},
{
"code": "45390"
},
{
"code": "45393"
},
{
"code": "45398"
}
]
},
{
"system": "http://snomed.info/sct",
"version": "2014.07.14AA",
"filter": [
{
"property": "concept",
"op": "is-a",
"value": "73761001"
}
]
},
{
"system": "http://snomed.info/sct",
"version": "2014.07.14AA",
"filter": [
{
"property": "concept",
"op": "is-a",
"value": "174184006"
}
]
}
]
},
"expansion": {
"timestamp": "2016-09-20T13:07:55.271-04:00",
"total": 54,
"offset": 0,
"contains": [
{
"system": "http://snomed.info/sct",
"code": "310634005",
"display": "Check colonoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "73761001",
"display": "Colonoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "446745002",
"display": "Colonoscopy and biopsy of colon"
},
{
"system": "http://snomed.info/sct",
"code": "446521004",
"display": "Colonoscopy and excision of mucosa of colon"
},
{
"system": "http://snomed.info/sct",
"code": "447021001",
"display": "Colonoscopy and tattooing"
},
{
"system": "http://snomed.info/sct",
"code": "443998000",
"display": "Colonoscopy through colostomy with endoscopic biopsy of colon"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44388",
"display": "Colonoscopy through stoma; diagnostic, including collection of specimen(s) by brushing or washing, when performed (separate procedure)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44401",
"display": "Colonoscopy through stoma; with ablation of tumor(s), polyp(s), or other lesion(s) (includes pre-and post-dilation and guide wire passage, when performed)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44393",
"display": "Colonoscopy through stoma; with ablation of tumor(s), polyp(s), or other lesion(s) not amenable to removal by hot biopsy forceps, bipolar cautery or snare technique"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44389",
"display": "Colonoscopy through stoma; with biopsy, single or multiple"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44391",
"display": "Colonoscopy through stoma; with control of bleeding, any method"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44408",
"display": "Colonoscopy through stoma; with decompression (for pathologic distention) (eg, volvulus, megacolon), including placement of decompression tube, when performed"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44404",
"display": "Colonoscopy through stoma; with directed submucosal injection(s), any substance"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44403",
"display": "Colonoscopy through stoma; with endoscopic mucosal resection"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44402",
"display": "Colonoscopy through stoma; with endoscopic stent placement (including pre- and post-dilation and guide wire passage, when performed)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44406",
"display": "Colonoscopy through stoma; with endoscopic ultrasound examination, limited to the sigmoid, descending, transverse, or ascending colon and cecum and adjacent structures"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44390",
"display": "Colonoscopy through stoma; with removal of foreign body(s)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44392",
"display": "Colonoscopy through stoma; with removal of tumor(s), polyp(s), or other lesion(s) by hot biopsy forceps"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44394",
"display": "Colonoscopy through stoma; with removal of tumor(s), polyp(s), or other lesion(s) by snare technique"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44405",
"display": "Colonoscopy through stoma; with transendoscopic balloon dilation"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44397",
"display": "Colonoscopy through stoma; with transendoscopic stent placement (includes predilation)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "44407",
"display": "Colonoscopy through stoma; with transendoscopic ultrasound guided intramural or transmural fine needle aspiration/biopsy(s), includes endoscopic ultrasound examination limited to the sigmoid, descending, transverse, or ascending colon and cecum and adjacent structures"
},
{
"system": "http://snomed.info/sct",
"code": "12350003",
"display": "Colonoscopy with rigid sigmoidoscope through colotomy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45383",
"display": "Colonoscopy, flexible, proximal to splenic flexure; with ablation of tumor(s), polyp(s), or other lesion(s) not amenable to removal by hot biopsy forceps, bipolar cautery or snare technique"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45387",
"display": "Colonoscopy, flexible, proximal to splenic flexure; with transendoscopic stent placement (includes predilation)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45378",
"display": "Colonoscopy, flexible; diagnostic, including collection of specimen(s) by brushing or washing, when performed (separate procedure)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45388",
"display": "Colonoscopy, flexible; with ablation of tumor(s), polyp(s), or other lesion(s) (includes pre- and post-dilation and guide wire passage, when performed)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45398",
"display": "Colonoscopy, flexible; with band ligation(s) (eg, hemorrhoids)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45380",
"display": "Colonoscopy, flexible; with biopsy, single or multiple"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45382",
"display": "Colonoscopy, flexible; with control of bleeding, any method"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45393",
"display": "Colonoscopy, flexible; with decompression (for pathologic distention) (eg, volvulus, megacolon), including placement of decompression tube, when performed"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45381",
"display": "Colonoscopy, flexible; with directed submucosal injection(s), any substance"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45390",
"display": "Colonoscopy, flexible; with endoscopic mucosal resection"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45389",
"display": "Colonoscopy, flexible; with endoscopic stent placement (includes pre- and post-dilation and guide wire passage, when performed)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45391",
"display": "Colonoscopy, flexible; with endoscopic ultrasound examination limited to the rectum, sigmoid, descending, transverse, or ascending colon and cecum, and adjacent structures"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45379",
"display": "Colonoscopy, flexible; with removal of foreign body(s)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45384",
"display": "Colonoscopy, flexible; with removal of tumor(s), polyp(s), or other lesion(s) by hot biopsy forceps"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45385",
"display": "Colonoscopy, flexible; with removal of tumor(s), polyp(s), or other lesion(s) by snare technique"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45386",
"display": "Colonoscopy, flexible; with transendoscopic balloon dilation"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45392",
"display": "Colonoscopy, flexible; with transendoscopic ultrasound guided intramural or transmural fine needle aspiration/biopsy(s), includes endoscopic ultrasound examination limited to the rectum, sigmoid, descending, transverse, or ascending colon and cecum, and adjacent structures"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45355",
"display": "Colonoscopy, rigid or flexible, transabdominal via colotomy, single or multiple"
},
{
"system": "https://www.cms.gov/Medicare/Coding/MedHCPCSGenInfo/index.html",
"code": "G0105",
"display": "Colorectal cancer screening; colonoscopy on individual at high risk"
},
{
"system": "https://www.cms.gov/Medicare/Coding/MedHCPCSGenInfo/index.html",
"code": "G0121",
"display": "Colorectal cancer screening; colonoscopy on individual not meeting criteria for high risk"
},
{
"system": "http://snomed.info/sct",
"code": "427459009",
"display": "Diagnostic endoscopic examination of colonic pouch and biopsy of colonic pouch using colonoscope"
},
{
"system": "http://snomed.info/sct",
"code": "174184006",
"display": "Diagnostic endoscopic examination on colon"
},
{
"system": "http://snomed.info/sct",
"code": "367535003",
"display": "Fiberoptic colonoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "8180007",
"display": "Fiberoptic colonoscopy through colostomy"
},
{
"system": "http://snomed.info/sct",
"code": "25732003",
"display": "Fiberoptic colonoscopy with biopsy"
},
{
"system": "http://snomed.info/sct",
"code": "34264006",
"display": "Intraoperative colonoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "235151005",
"display": "Limited colonoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "174158000",
"display": "Open colonoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "444783004",
"display": "Screening colonoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "303587008",
"display": "Therapeutic colonoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "235150006",
"display": "Total colonoscopy"
}
]
}
}

View File

@ -1,208 +0,0 @@
{
"resourceType": "ValueSet",
"id": "2.16.840.1.113883.3.464.1003.198.12.1010",
"meta": {
"versionId": "6",
"lastUpdated": "2017-07-25T09:54:33.579+00:00"
},
"url": "http://measure.eval.kanvix.com/cql-measure-processor/baseDstu3/Valueset/2.16.840.1.113883.3.464.1003.198.12.1010",
"name": "Flexible Sigmoidoscopy eMeasure",
"compose": {
"include": [
{
"system": "http://www.ama-assn.org/go/cpt",
"version": "2015.1.14AB",
"concept": [
{
"code": "45330"
},
{
"code": "45339"
},
{
"code": "45331"
},
{
"code": "45334"
},
{
"code": "45337"
},
{
"code": "45340"
},
{
"code": "45335"
},
{
"code": "45341"
},
{
"code": "45332"
},
{
"code": "45333"
},
{
"code": "45338"
},
{
"code": "45345"
},
{
"code": "45342"
},
{
"code": "45346"
},
{
"code": "45347"
},
{
"code": "45349"
},
{
"code": "45350"
}
]
},
{
"system": "https://www.cms.gov/Medicare/Coding/MedHCPCSGenInfo/index.html",
"version": "2016.1.15AB",
"concept": [
{
"code": "G0104"
}
]
},
{
"system": "http://snomed.info/sct",
"version": "2014.07.14AA",
"filter": [
{
"property": "concept",
"op": "is-a",
"value": "44441009"
}
]
}
]
},
"expansion": {
"timestamp": "2016-09-20T13:20:03.237-04:00",
"total": 22,
"offset": 0,
"contains": [
{
"system": "https://www.cms.gov/Medicare/Coding/MedHCPCSGenInfo/index.html",
"code": "G0104",
"display": "Colorectal cancer screening; flexible sigmoidoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "425634007",
"display": "Diagnostic endoscopic examination of lower bowel and sampling for bacterial overgrowth using fiberoptic sigmoidoscope"
},
{
"system": "http://snomed.info/sct",
"code": "44441009",
"display": "Flexible fiberoptic sigmoidoscopy"
},
{
"system": "http://snomed.info/sct",
"code": "112870002",
"display": "Flexible fiberoptic sigmoidoscopy for removal of foreign body"
},
{
"system": "http://snomed.info/sct",
"code": "396226005",
"display": "Flexible fiberoptic sigmoidoscopy with biopsy"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45330",
"display": "Sigmoidoscopy, flexible; diagnostic, including collection of specimen(s) by brushing or washing, when performed (separate procedure)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45346",
"display": "Sigmoidoscopy, flexible; with ablation of tumor(s), polyp(s), or other lesion(s) (includes pre- and post-dilation and guide wire passage, when performed)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45339",
"display": "Sigmoidoscopy, flexible; with ablation of tumor(s), polyp(s), or other lesion(s) not amenable to removal by hot biopsy forceps, bipolar cautery or snare technique"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45350",
"display": "Sigmoidoscopy, flexible; with band ligation(s) (eg, hemorrhoids)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45331",
"display": "Sigmoidoscopy, flexible; with biopsy, single or multiple"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45334",
"display": "Sigmoidoscopy, flexible; with control of bleeding, any method"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45337",
"display": "Sigmoidoscopy, flexible; with decompression (for pathologic distention) (eg, volvulus, megacolon), including placement of decompression tube, when performed"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45335",
"display": "Sigmoidoscopy, flexible; with directed submucosal injection(s), any substance"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45349",
"display": "Sigmoidoscopy, flexible; with endoscopic mucosal resection"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45341",
"display": "Sigmoidoscopy, flexible; with endoscopic ultrasound examination"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45347",
"display": "Sigmoidoscopy, flexible; with placement of endoscopic stent (includes pre- and post-dilation and guide wire passage, when performed)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45332",
"display": "Sigmoidoscopy, flexible; with removal of foreign body(s)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45333",
"display": "Sigmoidoscopy, flexible; with removal of tumor(s), polyp(s), or other lesion(s) by hot biopsy forceps"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45338",
"display": "Sigmoidoscopy, flexible; with removal of tumor(s), polyp(s), or other lesion(s) by snare technique"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45340",
"display": "Sigmoidoscopy, flexible; with transendoscopic balloon dilation"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45345",
"display": "Sigmoidoscopy, flexible; with transendoscopic stent placement (includes predilation)"
},
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "45342",
"display": "Sigmoidoscopy, flexible; with transendoscopic ultrasound guided intramural or transmural fine needle aspiration/biopsy(s)"
}
]
}
}

View File

@ -1,147 +0,0 @@
{
"resourceType": "ValueSet",
"id": "2.16.840.1.113883.3.464.1003.198.12.1011",
"meta": {
"versionId": "3",
"lastUpdated": "2017-07-25T09:54:33.579+00:00"
},
"url": "http://measure.eval.kanvix.com/cql-measure-processor/baseDstu3/Valueset/2.16.840.1.113883.3.464.1003.198.12.1011",
"name": "Fecal Occult Blood Test (FOBT) eMeasure",
"compose": {
"include": [
{
"system": "http://loinc.org",
"version": "2.44.13AA",
"concept": [
{
"code": "27396-1"
},
{
"code": "58453-2"
},
{
"code": "2335-8"
},
{
"code": "14563-1"
},
{
"code": "14564-9"
},
{
"code": "14565-6"
},
{
"code": "12503-9"
},
{
"code": "12504-7"
},
{
"code": "27401-9"
},
{
"code": "27925-7"
},
{
"code": "27926-5"
},
{
"code": "29771-3"
},
{
"code": "57905-2"
},
{
"code": "56490-6"
},
{
"code": "56491-4"
}
]
}
]
},
"expansion": {
"timestamp": "2016-09-20T13:32:34.390-04:00",
"total": 15,
"offset": 0,
"contains": [
{
"system": "http://loinc.org",
"code": "27396-1",
"display": "Hemoglobin.gastrointestinal [Mass/mass] in Stool"
},
{
"system": "http://loinc.org",
"code": "58453-2",
"display": "Hemoglobin.gastrointestinal [Mass/volume] in Stool by Immunologic method"
},
{
"system": "http://loinc.org",
"code": "2335-8",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool"
},
{
"system": "http://loinc.org",
"code": "14563-1",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool --1st specimen"
},
{
"system": "http://loinc.org",
"code": "14564-9",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool --2nd specimen"
},
{
"system": "http://loinc.org",
"code": "14565-6",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool --3rd specimen"
},
{
"system": "http://loinc.org",
"code": "12503-9",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool --4th specimen"
},
{
"system": "http://loinc.org",
"code": "12504-7",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool --5th specimen"
},
{
"system": "http://loinc.org",
"code": "27401-9",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool --6th specimen"
},
{
"system": "http://loinc.org",
"code": "27925-7",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool --7th specimen"
},
{
"system": "http://loinc.org",
"code": "27926-5",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool --8th specimen"
},
{
"system": "http://loinc.org",
"code": "29771-3",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool by Immunologic method"
},
{
"system": "http://loinc.org",
"code": "57905-2",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool by Immunologic method --1st specimen"
},
{
"system": "http://loinc.org",
"code": "56490-6",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool by Immunologic method --2nd specimen"
},
{
"system": "http://loinc.org",
"code": "56491-4",
"display": "Hemoglobin.gastrointestinal [Presence] in Stool by Immunologic method --3rd specimen"
}
]
}
}

View File

@ -1,10 +1,6 @@
{
"resourceType": "PlanDefinition",
"id": "apply-example",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">General PlanDefinition $apply example resource</div>"
},
"identifier": [
{
"use": "official",
@ -56,4 +52,4 @@
]
}
]
}
}