Giter Club home page Giter Club logo

health-data-standards's Introduction

Measure Authoring Tool (MAT)

Installation

The Measure Authoring Tool (MAT) was designed using many open source products including, the Google Web Toolkit (GWT) framework, Java JDK, and MySQL. GWT allows a developer to write client side code in Java and GWT converts it to JavaScript. The MAT uses MySQL as its backend database server.

Due to the use of these open source products, a working knowledge of Java development and some research into how the products work with each other in your environment may be necessary. Research from discussions on product forums, help documents, internet searches and knowledge of the local environment where the MAT will be running may all need to be checked if there are errors during install.

Configure Java (JDK)

  • The application has not been tested with version above Java 15; (OPEN JDK is fine) please ensure this version is in the environment.
  • Verify that JAVA_HOME and PATH system variables are pointing to the proper folder(s).
    • For example, the JAVA_HOME should point to the Java SDK 15.0.x folder and PATH should point to the Java 15.0.x/bin.

Configure Maven

You should install the latest Maven locally.

Windows:

OSX:

  • brew install maven or if already installed brew update maven

Create MAT Database

MAT uses MySQL Community Version 8.0.22. Here are some instructions for installing it using brew.

MySQL Install:

  • Install MySQL (MAT currently has been tested with MySQL Community Version 8.0.22) available from MySQL
  • Run the MySQL community server installer for your operating system and the MySQL workbench (which comes with the download).
  • Enter a password and click on Use Legacy Password Encryption. (Remember the username/pwd you will need these in future steps.)
  • For Mac:
  • Go to System Preferences/ MY SQL after installing.
  • Click Initialize Database.
  • Start the MYSQL Db.
  • Create a new MySQL Connection to the database. (example tooling: IDE Built-in Tooling, Jetbrains datagrip, MySQL Workbench)
  • If you have access to a data dump, create a schema and load it with your dump script.
  • If you do not you can load the dump script located in scripts.
  • From the MAT Code base, find the scripts/Dump*.sql file and then execute the script in the database that was just created.
    (Note this script is from a dump and drops and create a schema called MAT_APP_BLANK)
  • There are other more recent dump files located here.

Tomcat installation

Download tomcat 9

  • After installing, you may need to sudo chmod -R 777 on the tomcat directory.

Add the JDBC Resource to the Tomcat context file ($CATALINA_HOME/conf/context.xml). Match the username, password, and schema name to your mysql configuration.

<Resource name="jdbc/mat_app_tomcat"
         cachingAllowed="true"
         cacheMaxSize="1000000"
         auth="Container"
         type="javax.sql.DataSource"
         factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
         testWhileIdle="true"
         testOnBorrow="true"
         testOnReturn="false"
         validationQuery="SELECT 1"
         validationInterval="30000"
         timeBetweenEvictionRunsMillis="30000"
         maxActive="100"
         minIdle="10"
         maxWait="10000"
         initialSize="10"
         removeAbandonedTimeout="60"
         removeAbandoned="true"
         logAbandoned="true"
         minEvictableIdleTimeMillis="30000"
         jmxEnabled="true"
         jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;
           org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
         username="<USERNAME>"
         password="<PASSWORD>"
         driverClassName="com.mysql.jdbc.Driver"
         url="jdbc:mysql://localhost:3306/<SCHEMA_NAME>"/>

Copy mysql jdbc to tomcat lib directory. bash cp ~/.m2/repository/mysql/mysql-connector-java/8.0.22/mysql-connector-java-8.0.22.jar $CATALINA_HOME/lib

Create an OKTA account to use locally.

You need to create an Okta developer account to run MAT locally. This is a stand-in for HARP. After creating one and going to settings my url looks like this:

https://${yourOktaDomain}/admin/settings/account

The ${yourOktaDomain} part is what you will use to configure okta below.

If you started from a blank ID you can run this to update your user row with your okta id:

update USER set HARP_ID = '${YOUR_OKTA_ID:john-doe}' where LOGIN_ID='devUser8762';

If you started from a db dump you will need to overwrite a HARP_ID in the user table with your HARP_ID to login.

Setup microservices needed for MAT

Follow the instructions here: https://github.com/MeasureAuthoringTool/QDM-QICore-Conversion

Setup local environment IntelliJ configurations (mvn, tomcat, super dev mode)

GWT takes a while to compile so if you setup like this locally you will save a lot of time. These instructions are written for IntelliJ.

  • Install the GWT intellij plugin.
  • Go to Edit Configurations

  • Click the + in the top left and add a tomcat server.

  • Example Tomcat Run Configuration

  • Paste in the following for VM options: Replace https://${yourOtkaDomain} with the domain from your Okta Developer Account. See Find your Okta domain.
-DENVIRONMENT=DEV
-Dlog4j.ignoreTCL=true
-D2FA_AUTH_CLASS=mat.server.twofactorauth.DefaultOTPValidatorForUser
-D2FA_AUTH_CLASS1=mat.server.twofactorauth.DefaultOTPValidatorForUser
-DBONNIE_RESPONSE_TYPE=code
-DBONNIE_REDIRECT_URI=https//yourredirectURI.com
-DBONNIE_CLIENT_ID=1234567890
-DBONNIE_CLIENT_SECRET=1234567890
-DBONNIE_URI=https://bonnieURL.org
-DALGORITHM=EncyptionAlgorithm
-DPASSWORDKEY=PasswordKey
-DFHIR_SRVC_URL=http://localhost:9080
-DQDM_QICORE_MAPPING_SERVICES_URL=http://localhost:9090
-DCQL_ELM_TRANSLATION_URL=http://localhost:7070
-DHARP_BASE_URL=https://${yourOktaDomain}
-DHARP_URL=https://${yourOktaDomain}/oauth2/v1
-DHARP_CLIENT_ID=$OKTA_CLIENT_ID
-DMAT_API_KEY=DISABLED
-DVSAC_TICKET_URL_BASE=https://utslogin.nlm.nih.gov/cas/v1
-DVSAC_URL_BASE=https://vsac.nlm.nih.gov
-Dgwt.codeserver.port=9876
  • Go to Edit Configurations again and this time click the + and pick maven.

Maven Configuration

Maven Configuration with Test skip

GWT Configuration

  • Dev mode params:

    -noserver -war /Users/carson.day/git/MeasureAuthoringTool/target/MeasureAuthoringTool
    
  • Start page:

    http://localhost:8080/MeasureAuthoringTool_war_exploded/Login.html
    

How to build locally and run with super dev mode.

To compile faster you can make these changes, but DO NOT check them in.

  • In the *gwt.xml files in MAT. Change user agent to this:
<set-property name="user.agent" value="safari"/>
  1. Select Mat Code Server and start it up.
  2. Select Mat Tomcat and start it up. (wait until the server starts)
  3. A browser should pop up and you are off and running in super dev mode.
  4. Go to http://localhost:9876/
  5. Drag the Dev Mode On button onto your bookmark bar.
  6. Go to the browser page that popped up. View -> Developer.
  7. Click sources.
  8. The java GWT code from super dev mode will show up here under source maps
  9. You set break points in the browser and debug from the js.
  10. To recompile code click the bookmark you dragged to the bar in step 6 while in MAT.

Tomcat 10

Tomcat 10 is an implementation of the Servlet 5 specification (part of Jakarta EE 9) that renamed all of the packages from javax.servlet to jakarta.servlet. Neither Spring Boot nor Spring Framework supports Jakarta EE 9 at this time. (source)

See Specification API section of the Tomcat 9 to 10 Migration Guide for details on the changes between Tomcat 9 and 10.

IntelliJ: Tomcat 10 Configuration

Run the Apache Tomcat Migration Tool for Jakarta EE against the generated WAR and place the result in the target directory. IntelliJ will pick up the WAR and copy it to the Tomcat 10 webapps directory.

Prerequisite: Download the Migration tool

Download and expand the Binary Distribution for the Tomcat Migration Tool for Jakarta EE.

Prerequisite: Install Tomcat 10

Install Tomcat 10 locally by following the Tomcat 9 installation described above using the Tomcat 10 installer.

Run Configuration
  1. Repeat the IntelliJ Run Configuration described above using the Tomcat 10 installation directory.
  2. In the IntelliJ Run Configuration for Tomcat 10 > Before launch section > add an entry of Run External tool:
  3. Add a new Entry to the External Tools dialog:
    • Name: <Anything memorable>
    • Group: External Tools
    • Description: <Optional>
    • Program: <Migration Tool location>/bin/migrate.sh
    • Arguments $ProjectFileDir$/target/MeasureAuthoringTool.war $ProjectFileDir$/target/MeasureAuthoringTool.war
    • Working directory: $ProjectFileDir$
  4. Click OK to close the Edit Tool window.
  5. Click OK to close the External Tools window.
  6. Click OK to close the Run Configuration window.

Release build (NON-local)

mvn clean install

Log in to MAT

To login to MAT, open MySQL Workbench and run the following queries:

  • SELECT * FROM USER where USER_ID='Admin'
    • Look at the LOGIN_ID is your UserID.
    • The password default is ‘gargleBlaster_10’.
    • Enter any three digit code for security code.
  • Navigate to the MAT log in page GUI and use the UserID and password from the previous step and log in to MAT.
  • Once logged in, navigate to the Mat Account tab and enter the Admin user details under the Personal Information tab and the Security Questions tab to setup user’s security questions.
  • To change the password to something new, use the Password tab.
  • To create users an email is sent and this must be configured to obtain user names and passwords.

Important Security Setup With Git Secrets

  1. Use brew to install git secrets brew install git-secrets
  2. Clone this repository (you can skip this if you've already cloned it from previous steps)
  3. Note: You may have to reinitialize these hooks each time you clone a new copy of the repo
  4. Follow these instructions for setting up the pre-commit hooks:
    cd /path/to/MeasureAuthoringTool
    git secrets --install
    git secrets --register-aws
  5. Done! Now each commit should be automatically scanned for accidental AWS secret leaks.

health-data-standards's People

Contributors

abgoldstein avatar adongare avatar andrequina avatar c-monkey avatar carpeliam avatar casey-erdmann avatar cmoesel avatar d-ross avatar dczulada avatar dehall avatar edeyoung avatar eedrummer avatar elehner avatar ewhitley avatar gavin-black avatar hadleynet avatar holmesie avatar hossenlopp avatar i2amsam avatar jletourneau80 avatar jtferns avatar mulcahyk avatar nonlinearity avatar pelargir avatar pkmitre avatar rdingwell avatar snosrap avatar ssayer avatar tstrass avatar xodarap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

health-data-standards's Issues

How to pass in "codes" when parsing HQMF R1 files

I get the following messages when parsing a HQMF R1 file, for example CMS60v2.xml (from USHIK/CMS):

  • Codes not passed in, cannot backfill properties like gender
  • no code set to back fill: Clinical Trial Participant
  • no code set to back fill: Clinical Trial Participant
  • no code set to back fill: Clinical Trial Participant
  • no code set to back fill: birth date
  • no code set to back fill: birth date
  • no code set to back fill: Clinical Trial Participant
  • no code set to back fill: Clinical Trial Participant
  • (0164)codes are nil!!!!!!!!!!!

I have traced these messages back to https://github.com/projectcypress/health-data-standards/blob/7896e22444f8ff51f5c5dbca4c12cb5be7c03e11/lib/hqmf-parser/converter/pass1/document_converter.rb and https://github.com/projectcypress/health-data-standards/blob/7896e22444f8ff51f5c5dbca4c12cb5be7c03e11/lib/hqmf-parser/parser.rb

Are "codes" another name for value sets/concepts? Is there an example of how to parse HQMF R1 with this library while providing "codes"?

Thanks in advance!

continuous variable value, element 'entryRelationship' should have attribute 'typeCode'

The attribute is currently 'type'

https://github.com/projectcypress/health-data-standards/blob/develop/templates/cat3/_continuous_variable_value.cat3.erb#L1

but should be 'typeCode'

Cypress:

https://github.com/projectcypress/cypress/blob/master/resources/schematron/qrda/qrda_cat_3/QRDA_Category_III.sch#L546

QRDA 3:
5.4 Measure Data
14. MAY contain zero or more [0..*] entryRelationship (CONF:18143) such that it
a. SHALL contain exactly one [1..1] @typecode="COMP" (CodeSystem: HL7ActRelationshipType 2.16.840.1.113883.5.1002 STATIC) (CONF:18148).

Generate a QRDA1 from CCDA file?

Looking for guidance on how to use this project to convert generate/export a QRDA1 from a CCDA. It seems like it's possible from the README, but I couldn't find any documentation on how to do so.

Is hqmf1.xml retired?

Hi ,

Would like to know if hqmf1.xml is retired in health-data-standards version 3.6.1?
My code is referring to template Ids for data_criterias mentioned in hqmf1.xml of version 2.4.0.
Should I be replacing all my old templateIds of all data_criteria to refer to hqmf2.xml's templateIds from 3.6.1 version?

Health-data-standards crash on encounters without discharge dispositions

When trying to upload a file in popHealth with an encounter section but no dischargeDispositionCode, I get this error:

Nokogiri::XML::XPath::SyntaxError (Undefined namespace prefix: ./sdtc:discharge\DispositionCode): lib/record_importer.rb:64:in `import' app/controllers/admin_controller.rb:42:in`block (2 levels) in upload_patients' app/controllers/admin_controller.rb:39:in `each' app/controllers/admin_controller.rb:39:in`block in upload_patients' app/controllers/admin_controller.rb:38:in `upload_patients'

It seems to be coming from this line in health-data-standards:

encounter.discharge_disposition = extract_code(parent_element, "./sdtc:dischargeDispositionCode")

Encounters MAY contain [0..1] dischargeDispositionCodes, so the lack of a dischargeDispositionCode shouldn't be a fatal error.

HealthDataStandards::Export::Cat1

Is this class even viable anymore (in version 3.7.0)?

I have imported patients and Cat3 export functions as expected but Cat1 export fails to produce any entries in Patient Data section.

I traced the problem to the measure class having no data_criteria. So I rewrote the all_data_criteria function to return the data_criteria from the hqmf_document and got results (after fixing several errors in related .erb files)

Now I am finding various other issues with missing / incorrect entry exports.
I am beginning to think that this is a dead class and I am wasting my time.

Is this the case?

Encounter Performed Cat I template uses the wrong value set for transfers

When generating QRDA Cat I, the value set for the overall encounter is passed in to the code_display method for transfer from and transfer to. This causes problems on CQMs like CMS188 because the transfer value sets do not overlap with the encounter value set. This causes the code_display method to null flavor the code even if it is not part of the encounter value set.

bundle-latest.zip no longer exists on the new demo server

The code here defaults to a file that does not exist on the new demo server.

bundle_version = ENV["version"] || "latest"

https://github.com/projectcypress/health-data-standards/blob/04efeebbc9b99d6d8d7a917ff85f1a4ba225fed6/lib/health-data-standards/tasks/bundle.rake#L48

This is a 404 now.

https://cypressdemo.healthit.gov/measure_bundles/bundle-latest.zip

On the previous demo server this behavior worked as expected.

I am not sure what the expected behavior should be. The file should exist or the version should be required?

Models should be namespaced

This gem defines dozens of models (most of them subclasses of Entry) but fails to namespace them within the HealthDataStandards. This means that my own application's Procedure, Provider, etc. classes get stepped on as soon as I import the gem.

+1 for properly namespacing these models.

Rails 4.2?

Trying to bundle install into Rails 4.2 app, but there are many conflicts. Is there a branch that supports this Rails version?

Need to specify a version of rubyzip in the gemspec

We don't specify the version of rubyzip we are using in our gemspec. Our code currently works with rubyzip 0.9.9, but breaks on versions greater than 1.0.0. We should upgrade to the latest version of rubyzip and specify a version number.

HQMF parsing: possible to list data elements by location?

I'm wondering what the LOE/suggested course of implementing the following feature/output: I have a need to take a HQMF document, parse it, and, for each data element, see where in the population_criteria it exists (IPP, DENEX, NUMER, DENEXCEP, etc.). I know many data elements get used several times per measure.

Any guidance is much appreciated!

Thanks,

Mark

Provided TIN not imported from qrda/cda in provider_importer.rb

In Cypress health-data-standards-1bb2d48cf24f (mongoid) at least, file path /lib/health-data-standards/import/cda/provider_importer.rb the provider NPI is extracted but not the provider TIN.

2016 C4 filter applications that use the health-data-standards library require the provider TIN.
It is possibly a one-line addition to extract_provider_data in HealthDataStandards::Import::CDA::ProviderImporter.

I'm not a Ruby-experienced, but I will try the change locally and report.

Handle locations

I'm interested in using popHealth to create location-level QRDA-III documents. It seems like when popHealth calls into health-data-standards after doing a location-level aggregation, it passes a null providers array. So one way of handling this is to change this branch in _providers.cat3.erb:

 <% if providers.empty? -%>
    <!-- No provider data found in the patient record
         putting in a fake provider -->
      ...

I can submit a pull request with this change, but I wanted to get feedback from others on the project about whether this is the right path. Is this the right thing to do? Should I pass in a location variable or modify the providers array somehow? Just have a default in the config file and not actually pass stuff between popHealth and hds? Other ideas?

Medication importer with Reason Underweight issue for measure CMS69 (CAT1)

I have an issue with a patient that should meet numerator for measure CMS69

cms65numerator

The patient has a Medication, Order: Below Normal Medications with Reason Underweight. (CAT1 file)

        <!-- ================= Medication Order template ================= -->
        <substanceAdministration classCode="SBADM" moodCode="RQO">
          <templateId extension="2014-06-09" root="2.16.840.1.113883.10.20.22.4.42"/>
          <!-- Medication, Order template -->
          <templateId extension="2016-02-01" root="2.16.840.1.113883.10.20.24.3.47"/>
          <id extension="Get Well Clinic-1-1372-2400-DF" root="2.16.840.1.113883.3.1452.3"/>
          <text>SIG information not entered</text>
          <statusCode code="completed"/>
          <effectiveTime xsi:type="IVL_TS">
            <low value="20170510235959"/>
            <high nullFlavor="UNK"/>
          </effectiveTime>
          <routeCode/>
          <doseQuantity nullFlavor="NA"/>
          <consumable>
            <manufacturedProduct classCode="MANU">
              <!-- Medication Information (consolidation) template -->
              <templateId extension="2014-06-09" root="2.16.840.1.113883.10.20.22.4.23"/>
              <id root="ba86866c-73ff-40cf-841d-26cfe8747a8f"/>
              <manufacturedMaterial>
                <code code="860221" codeSystem="2.16.840.1.113883.6.88" codeSystemName="RxNorm" sdtc:valueSet="2.16.840.1.113883.3.600.1.1499" xsi:type="CE">
                  <originalText>SIG information not entered</originalText>
                </code>
              </manufacturedMaterial>
            </manufacturedProduct>
          </consumable>
          <author>
            <templateId root="2.16.840.1.113883.10.20.22.4.119"/>
            <time value="20170510235959"/>
            <assignedAuthor>
              <id root="3fd83a53-d600-4fb6-99c6-60939e63e91e"/>
            </assignedAuthor>
          </author>
          <!-- ================= Reason template ================= -->
          <entryRelationship typeCode="RSON">
            <observation classCode="OBS" moodCode="EVN">
              <templateId extension="2014-12-01" root="2.16.840.1.113883.10.20.24.3.88"/>
              <id extension="7368fe92-7891-4b76-b65e-524c9ed59668" root="2.16.840.1.113883.3.1452.1011"/>
              <code code="77301-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="reason"/>
              <statusCode code="completed"/>
              <effectiveTime>
                <low value="20170510235959"/>
              </effectiveTime>
              <value code="248342006" codeSystem="2.16.840.1.113883.6.96" sdtc:valueSet="2.16.840.1.113883.3.600.2388" xsi:type="CD"/>
            </observation>
          </entryRelationship>
        </substanceAdministration>
      </entry>
      <entry>

I reviewed the class medication_importer.rb (health-data-standards/lib/health-data-standards/import/cda/medication_importer.rb) the method in charge of to extract the reason or negation is implemented the following way:

    def extract_reason_or_negation(parent_element, medication)
      negation_indicator = parent_element['negationInd']
      if negation_indicator.nil? && parent_element.parent.name == "entryRelationship"
        super(parent_element.parent.parent, medication, parent_element)
      elsif negation_indicator.eql?('true')
        super(parent_element, medication)
      end
    end

In my scenario the medication order doesn't have a negationInd=true and the parent_element.parent.name != "entryRelationship", when the method receives the medication order entry the method doesn't extract the reason.

I think, the issue could be solved if the method is changed of the following way:

    def extract_reason_or_negation(parent_element, medication)
      negation_indicator = parent_element['negationInd']
      if negation_indicator.nil? && parent_element.parent.name == "entryRelationship"
        super(parent_element.parent.parent, medication, parent_element)
      else
        super(parent_element, medication)
      end
    end

Please let me know if this is an issue or there is something wrong in my medication order entry.

Thanks in advance.

CMS IG

Is there interest in a setting to use the CMS implementation guide? My guess is that most people using this library want to use it for Medicare reporting purposes.

NoMethodError when C32 file doesn't have patient element

PatientImporter#get_demographics blows up at line 130 when the C32 file being parsed doesn't have a "ClinicalDocument > recordTarget > patientRole > patient" element:

NoMethodError: undefined method `at_xpath' for nil:NilClass
    /Users/pelargir/.rvm/gems/ruby-2.0.0-p0/gems/health-data-standards-3.1.1/lib/health-data-standards/import/c32/patient_importer.rb:130:in `get_demographics'
    /Users/pelargir/.rvm/gems/ruby-2.0.0-p0/gems/health-data-standards-3.1.1/lib/health-data-standards/import/c32/patient_importer.rb:86:in `parse_c32'

This should instead be handled gracefully without throwing an exception.

CDA extract_scalar doesnt play nice with floats

I recently noticed that when importing sections that have a scalar unit (such as the dosage for a medication) that the value is being converted to an integer.

It looks like the culprit is the to_i on line 193 of lib/health-data-standards/import/cda/section_importer.rb.

{'unit' => scalar_element['unit'], 'value' => scalar_element['value'].to_i}

Will it break anything if we change this to to_f instead?

Patient Importer - Comm from Provider to Provider - Wrong ID

In patient_importer.rb:
generate_importer(Cat1::ProcedureImporter, nil, '2.16.840.1.113883.3.560.1.129'), #comm from provider to provider

If I look at the spec, the code should be ...1.29 not ...1.129. There's an extra 1 in there.1.129is thenegation: trueversion ofcommunication_from_provider_to_provideraccording to thehqmf_template_oid_map`.

I think anyway :) If I'm wrong, please let me know why. FWIW, I had to edit my records documents in my DB to be 1.29 instead of 1.129 to pass Measure 0089 QRDA Cat I Test in Cypress.

Ruby 2.4

Please add Ruby 2.4 support.

This gem does not build with Ruby 2.4, due to out of date dependencies, and the deprecation of Fixnum and Bignum within Ruby 2.4.

QRDA-1: CMS68v6 > Procedures > Not Done

Hi, QRDA-1 Cypress given Patient data missing Procedures. Please check attached xml, it should give procedures data but its not. See entry

<entry>
  <procedure classCode="PROC" moodCode="EVN" negationInd="true">
    <!--  Procedure performed template -->
    <templateId root="2.16.840.1.113883.10.20.24.3.64" extension="2016-02-01"/>
    <!-- Procedure Activity Procedure-->
    <templateId root="2.16.840.1.113883.10.20.22.4.14" extension="2014-06-09"/>
    <id root="1.3.6.1.4.1.115" extension="598b6d12636239085b3738ef"/>
    <code nullFlavor="NA" sdtc:valueSet="2.16.840.1.113883.3.600.1.462"/>
    <text>Procedure, Performed: Current Medications Documented Snmd</text>
    <statusCode code="completed"/>
    <effectiveTime>
      <low value="20150301160000"/>
      <high value="20150301160000"/>
    </effectiveTime>
    
    <entryRelationship typeCode="RSON">
  <observation classCode="OBS" moodCode="EVN">
    <templateId root="2.16.840.1.113883.10.20.24.3.88" extension="2014-12-01"/>
    <id root="1.3.6.1.4.1.115" extension="E02C3F9B677C6C8A53AAF5360E113086"/>
    <code code="77301-0" codeSystem="2.16.840.1.113883.6.1" displayName="reason" codeSystemName="LOINC"/>
    <statusCode code="completed"/>
      <effectiveTime>
        <low value="20150301160000"/>
      </effectiveTime>
    <value xsi:type="CD" code="183932001" codeSystem="2.16.840.1.113883.6.96" sdtc:valueSet="2.16.840.1.113883.3.600.1.1502"/>
  </observation>
</entryRelationship>


  </procedure>
</entry>

46_Ricky_Graham.txt

Any help would be appreciated, thanks

Using without MongoDB

Hi, using to extract information from QRDA, CAT-1, able to extract Patient without MongoDB but when extracting provider_performances, its giving up error

Problem:
  No configuration could be found for a session named 'default'.
Summary:
  When attempting to create the new session, Mongoid could not find a session configuration for the name: 'default'. This is necessary in order to know the host, port, and options needed to connect.
Resolution:
  Double check your mongoid.yml to make sure under the sessions key that a configuration exists for 'default'. If you have set the configuration programatically, ensure that 'default' exists in the configuration hash.

using snippet from bulk_record_importer.rb and used CDA::ProviderImporter.instance.extract_providers for extraction.

Any help would be appreciated, thanks

Test failures for cat_1 test

I'm trying to run the Cat 1 export test test/unit/export/cat_1_test.rb and I'm getting test failures.

$ ruby test/unit/export/cat_1_test.rb
Started with run options --seed 12363

Cat1Test
  test_record_target_export                                       PASS (0.64s)
  test_payer_information                                          PASS (0.64s)
  test_unique_data_criteria                                       PASS (0.70s)
  test_reporting_parameters_section_export                        PASS (0.62s)
Testing Cat I for Barry Berry
Testing Cat I for Mary Berry
  test_schematron_r2_validation                                   FAIL (6.39s)
Minitest::Assertion:         Invalid Cat I for Mary Berry (with header).
        --- expected
        +++ actual
        @@ -1 +1 @@
        -[]
        +[#<ValidationError:0xXXXXXX @location="/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='structuredBody' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][3]/*[local-name()='section' and namespace-uri()='urn:hl7-org:v3']", @message="SHALL contain at least one [1..*] entry (CONF:14567).", @validator="QRDA Cat 1 Validator", @file_name="cat1_good.xml">]
        test/unit/export/cat_1_test.rb:78:in `block in test_schematron_r2_validation'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mongoid-4.0.0/lib/mongoid/contextual/mongo.rb:648:in `yield_document'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mongoid-4.0.0/lib/mongoid/contextual/mongo.rb:123:in `block in each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/moped-2.0.7/lib/moped/cursor.rb:29:in `block in each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/moped-2.0.7/lib/moped/cursor.rb:29:in `each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/moped-2.0.7/lib/moped/cursor.rb:29:in `each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/moped-2.0.7/lib/moped/query.rb:78:in `each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mongoid-4.0.0/lib/mongoid/contextual/mongo.rb:122:in `each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mongoid-4.0.0/lib/mongoid/contextual.rb:20:in `each'
        test/unit/export/cat_1_test.rb:67:in `test_schematron_r2_validation'

  test_entries_for_data_criteria                                  FAIL (0.72s)
Minitest::Assertion:         Expected: 1
          Actual: 0
        test/unit/export/cat_1_test.rb:105:in `test_entries_for_data_criteria'

  test_patient_data_section_export                                FAIL (0.67s)
Minitest::Assertion:         med_dispensed is nil
        test/unit/export/cat_1_test.rb:95:in `test_patient_data_section_export'

Testing Cat I for Barry Berry
Testing Cat I for Mary Berry
  test_schematron_validation                                      FAIL (7.30s)
Minitest::Assertion:         Invalid Cat I for Mary Berry (with header).
        --- expected
        +++ actual
        @@ -1 +1 @@
        -[]
        +[#<ValidationError:0xXXXXXX @location="/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='structuredBody' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][3]/*[local-name()='section' and namespace-uri()='urn:hl7-org:v3']", @message="SHALL contain at least one [1..*] entry (CONF:14567).", @validator="QRDA Cat 1 R3 Validator", @file_name="cat1_good.xml">]
        test/unit/export/cat_1_test.rb:60:in `block in test_schematron_validation'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mongoid-4.0.0/lib/mongoid/contextual/mongo.rb:648:in `yield_document'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mongoid-4.0.0/lib/mongoid/contextual/mongo.rb:123:in `block in each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/moped-2.0.7/lib/moped/cursor.rb:29:in `block in each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/moped-2.0.7/lib/moped/cursor.rb:29:in `each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/moped-2.0.7/lib/moped/cursor.rb:29:in `each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/moped-2.0.7/lib/moped/query.rb:78:in `each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mongoid-4.0.0/lib/mongoid/contextual/mongo.rb:122:in `each'
        /Users/pairing/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mongoid-4.0.0/lib/mongoid/contextual.rb:20:in `each'
        test/unit/export/cat_1_test.rb:49:in `test_schematron_validation'

Testing Cat I for Barry Berry
Testing Cat I for Mary Berry
Testing Cat I for Rosa Vasquez
  test_schema_validation                                          PASS (0.87s)
  test_handling_expired_patients                                  PASS (0.67s)
  test_cda_header_export                                          PASS (0.63s)
  test_measure_section_export                                     PASS (0.58s)

Finished in 20.44585s
12 tests, 28 assertions, 4 failures, 0 errors, 0 skips

I'm using Ruby 2.2.1 and mongo 3.4.4.

Question about the hqmf-generator

Hello,

I would like to use the hqmf-generator.
Can you give me an example of how to use it?

I have seen that there are several .erb documents, for every part of the document, like population criteria.erb, data criteria.erb etc.

My question is what kind of parameters should I give to generate an hqmf.xml file?
In the ErbContext, I have seen that there is initialization of some vars, but I can not figure out what kind of parameters I should give to produce a HQMF file.

Thank you in advance

Parser fix possibly not applied in rubygems 3.6.1

Using popHealth with 3.6.1 of the HDS gem from rubygems. When I try to upload the following HQMF definition using the UI:
BP_Test_v4_3_eMeasure.txt

It is failing to be recognized as a valid v2 HQMF document (V2Parser::valid? is returning false). There is a commit that addresses this, however it does not appear to be applied in the version pulled down from rubygems. I did "gem unpack" and confirmed the relevant change does not exist in lib/hqmf-parser/parser.rb.

If I change the popHealth Gemfile to pull from the master github branch of the HDS library, the error goes away. This is a reasonable workaround to proceed with. I just wanted to raise this to confirm others have seen something similar, and to see if HDS may need to be updated in rubygems.

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

question about field_value_helper.rb

In this particular file -> https://github.com/projectcypress/health-data-standards/blob/master/lib/hqmf-parser/2.0/field_value_helper.rb

I noticed that the file field_value_helper has the following method, using XPATH looking for typeCode="REFV"... should the XPATH be changed to typeCode="REFR"? I didn't notice that particular type code in the HQMF for the 2016 reporting year measures.

def self.parse_observation_fields(entry, fields) 
      parse_dset_cd(entry.at_xpath('./cda:methodCode', HQMF2::Document::NAMESPACES), 'METHOD', fields) 
      parse_dset_cd(entry.at_xpath('./cda:targetSiteCode', HQMF2::Document::NAMESPACES), 
                    'ANATOMICAL_LOCATION_SITE', fields) 
      parse_cd(entry.at_xpath("./cda:participation[@typeCode='SBJ']/cda:role[@classCode='PRS']/cda:code", 
                              HQMF2::Document::NAMESPACES), 
               'RELATIONSHIP', fields) 
      parse_pq(entry.at_xpath("./cda:outboundRelationship[@typeCode='REFV']/cda:observationCriteria/cda:value/cda:high", 
                              HQMF2::Document::NAMESPACES), 
               'REFERENCE_RANGE_HIGH', fields) 
      parse_pq(entry.at_xpath("./cda:outboundRelationship[@typeCode='REFV']/cda:observationCriteria/cda:value/cda:low", 
                              HQMF2::Document::NAMESPACES), 
               'REFERENCE_RANGE_LOW', fields) 
    end

Basic use documentation

Found this gem when trying to investigate CDA parsing options outside of pure nokogiri. This gem seems very useful but there seems to be no documentation or examples anywhere on how to use it. Producing some documentation would be helpful.

CAT3 export: manufacturerModelName

In the HL7 spec regarding the assignedAuthoringDevice element, there's no mention of a manufacturerModelName element, but both the template that generates this, and the Cypress 2.4.0 schema expect it to show up before the softwareName element if it's going to be there.

Assuming that we're trying to get health-data-standards to match the Cypress schema, since that's the certification tool?

CAT3 export: Extra 'id' element

Measure NQF_ID: 0004

Cypress error: Element '{urn:hl7-org:v3}id': This element is not expected. Expected is one of ( {urn:hl7-org:v3}realmCode, {urn:hl7-org:v3}typeId, {urn:hl7-org:v3}templateId, {urn:hl7-org:v3}representedCustodianOrganization ).

Proposed change: It appears that https://github.com/projectcypress/health-data-standards/blob/develop/templates/cat3/show.cat3.erb#L44 outputs an extra id element that is simply incorrect and should be removed

Supporting references:

'nil' error on 'numerator' inside of QRDA Cat3 `_performance_rate` partial

When I import the sample measures (v2.3) and sample patient data from Project Cypress into a popHealth instance using health-data-standards (3.2.7) and try to run a QRDA Cat3 export against the sample data it dies on the following line:

https://github.com/projectcypress/health-data-standards/blob/master/templates/cat3/_performance_rate.cat3.erb#L10

with an error indicating that I'm calling id on nil, which in this case means my aggregate_count.numerator object is nil.

In my sample instance I slightly modified this line for debugging to output aggregate_count.numerator every time this code is called and it indicates that the numerator is always nil.

Any idea why? Is it most likely something in the data, in the date range, in the patient data, or could this line of code be pulling the wrong object or was it perhaps built against a previous version of the QRDA Cat3 specification?

Question - HQMF 2.1 Subsets and ""

Hello -

More of a question than an issue.

Some of the new EH measures released in May (EX: "EH_CMS190v4_NQF0372_VTE2/CMS190v4.xml") include excerpt entries that use sequenceNumber - no "subsetCode" entry.

The HQMF 2.x parser seems to want to have a type for these (https://github.com/projectcypress/health-data-standards/blob/7d49e1dd92815dd77b375a918b515c829a3a5a04/lib/hqmf-parser/2.0/types.rb#L183) "@type = attr_val('./cda:subsetCode/@code')"

In reading more of the documentation, there's a note that says "This representation aligns with the HQMF specification and does not require a subset operator."

The Data Criteria parser seems to attempt to create subset_operators for each "excerpt entry"
https://github.com/projectcypress/health-data-standards/blob/7d49e1dd92815dd77b375a918b515c829a3a5a04/lib/hqmf-parser/2.0/data_criteria.rb#L274

In the event that this is a sequence entry and does not contain a subsetCode, should we avoid creating a subset entry? Should the xpath in the data criteria parser only include entries that contain a subsetCode node?

Thank you,
Eric

Any relation to 2015 CEHRT?

Hello, sorry if this question is too basic, but does this software implement any portion of the 2015 CEHRT, or does it actually relate to that in any way?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.