Closed vais closed 7 years ago
Could the error be specific to a particular CQM? I am not sure how the map/reduce code works, but I believe that's implemented in javascript for each measure? The CQMs I was hitting are: 50, 165, 68, 65, 22, 69, 138, 166, and 155.
Yeah I can repeat this. And I think your right, there seems to be something wrong with the combination of the latest pophealth code and the 2.5.0 measure bundle from September.
For me it appears to be breaking when it tries to calculate cms 172. I wonder if a null value in one of the QRDA cat 1 files is causing this. In the past when I've seen an error like this and pophealth just seemed to "churn" and never finish it was because some QRDA cat 1 files we had uploaded had a null value for the low effective time on a procedure entry. My files don't have any null times this time but maybe there is another null value messing things up.
If I find out anything I will post it here.
I cloned the latest repo of pophealth and followed the instructions but I was facing same issue: failed with error 16722: "exception: SyntaxError: Unexpected token ;"
So I followed the instructions mentioned above: 1) git reset --hard eb00169578 2) delete all gems and do bundle install again 3) drop all dbs in mongo 4) imported the bundle
Project runs fine..error 16722: solved....Imported the patients.... But After login, on Home screen(Dashboard) if we select any measure, it gives NoMethodError :
Started POST "/api/queries" for 192.168.1.140 at 2014-11-19 16:04:08 +0530 Processing by Api::QueriesController#create as JSON Parameters: {"measure_id"=>"8A4D92B2-397A-48D2-0139-9BB3331F4C02", "sub_id"=>"b", "effective_date"=>1356998340, "patient_results"=>nil, "providers"=>["546c62fc66616c1a9a0a0000"], "query"=>{"measure_id"=>"8A4D92B2-397A-48D2-0139-9BB3331F4C02", "sub_id"=>"b", "effective_date"=>1356998340, "patient_results"=>nil, "providers"=>["546c62fc66616c1a9a0a0000"]}}
NoMethodError (undefined method []' for nil:NilClass): app/controllers/api/queries_controller.rb:141:in
build_mr_prefilter'
app/controllers/api/queries_controller.rb:55:in `create'
Don't know how to solve this error.
Secondly, I have uploaded patients and and their providers, but still Numerator=0/0, Denominator=0/0, IPP= 0/0. Is there any problem related to measureCalculation
Any help related to above two problems will be appreciated!!! Please mention any links, if available with you. Thanks.
@Ashish101 make sure you are using version 2.4.0 bundle as well. http://demo.projectcypress.org/bundles/bundle-2.4.0.zip
Hi @vais , bundle : 2.4.0 works properly. Thanks for the help.
I am using following configuration for pophealth: Ruby : 2.1.1 Rails : 3.2.18 quality-measure-engine : 3.0.2 health-data-standards : 3.4.6
NLM bundles work properly, But error "failed with error 16722: 'exception: SyntaxError: Unexpected token ;"' occurs when I do following steps (MAT->Bonnie->popHealth) :
1) Create measure in Measure Authoring Tool (MAT) with VSAC elements 2) Use this measure in Bonnie to generate measure_bundle along with few patients 3) Import measure_bundle into pophealth 4) Select the measure on Dashboard to show Measure Calculation
At Step 4, the error occurs at : bundle exec rake jobs:work
Error:
QME::MapReduce::MeasureCalculationJob failed with Moped::Errors::OperationFailure: The operation: #<Moped::Protocol::Command
@length=9811
@request_id=203
@response_to=0
@op_code=2004
@flags=[:slave_ok]
@full_collection_name="pophealth-development.$cmd"
@skip=0
@limit=-1
@selector={:mapreduce=>"records", :map=>"function() {\n var patient = this;\n var effective_date = 1356998340;\n var enable_logging = false;\n var enable_rationale = false;\n var short_circuit = ;\n\n \n var test_id = null;\n \n\n hqmfjs = {}\n if (typeof(map)==\"undefined\") {\nmap_reduce_utils();\nhqmf_utils();\n}\n\n\n hqmfjs.effective_date = effective_date;\n hqmfjs.test_id = test_id;\n \n \n var patient_api = new hQuery.Patient(patient);\n\n \n // #########################\n // ##### DATA ELEMENTS #####\n // #########################\n\n hqmfjs.nqf_id = '111';\n hqmfjs.hqmf_id = '402881E9-4A05-C2D1-014A-05CCD10D0008';\n hqmfjs.sub_id = null;\n if (typeof(test_id) == 'undefined') hqmfjs.test_id = null;\n\n OidDictionary = {'2.16.840.1.113762.1.4.1':{'AdministrativeSex':['F','M','U']},'2.16.840.1.114222.4.11.836':{'CDC Race':['1002-5','2028-9','2054-5','2076-8','2106-3','2131-1']},'2.16.840.1.114222.4.11.837':{'CDC Race':['2135-2','2186-5']},'2.16.840.1.114222.4.11.3591':{'SOP':['1','2','3','4','5','6','7','8','9','11','12','19','21','22','23','24','25','29','31','32','33','34','35','36','37','38','39','41','42','43','44','51','52','53','54','55','59','61','62','63','64','69','71','72','73','79','81','82','83','84','85','89','91','92','93','94','95','96','98','99','111','112','113','119','121','122','123','129','211','212','213','219','311','312','313','321','322','331','332','333','334','341','342','343','349','361','362','369','371','372','379','381','382','389','511','512','513','514','515','519','521','522','523','529','611','612','613','619','821','822','823','951','953','954','959','3111','3112','3113','3114','3115','3116','3119','3121','3122','3123','3211','3212','3221','3222','3223','3229','3711','3712','3713','3811','3812','3813','3819','9999','32121','32122','32123','32124','32125','32126']}};\n \n // Measure variables\nvar MeasurePeriod = {\n \"low\": new TS(\"201201010000\", true),\n \"high\": new TS(\"201212312359\", true)\n}\nhqmfjs.MeasurePeriod = function(patient) {\n return [new hQuery.CodedEntry(\n {\n \"start_time\": MeasurePeriod.low.asDate().getTime()/1000,\n \"end_time\": MeasurePeriod.high.asDate().getTime()/1000,\n \"codes\": {}\n }\n )];\n}\nif (typeof effective_date === 'number') {\n MeasurePeriod.high.date = new Date(1000*effective_date);\n // add one minute before pulling off the year. This turns 12-31-2012 23:59 into 1-1-2013 00:00 => 1-1-2012 00:00\n MeasurePeriod.low.date = new Date(1000*(effective_date+60));\n MeasurePeriod.low.date.setFullYear(MeasurePeriod.low.date.getFullYear()-1);\n}\n\n// Data critera\nhqmfjs.PatientCharacteristicEthnicityEthnicity = function(patient, initialSpecificContext) {\n var value = patient.ethnicity() || null;\n matching = matchingValue(value, null);\n matching.specificContext=hqmf.SpecificsManager.identity();\n return matching;\n}\n\nhqmfjs.PatientCharacteristicSexOncAdministrativeSex = function(patient, initialSpecificContext) {\n var value = patient.gender() || null;\n matching = matchingValue(value, new CD(\"F\", \"Administrative Sex\"));\n matching.specificContext=hqmf.SpecificsManager.identity();\n return matching;\n}\n\nhqmfjs.PatientCharacteristicPayerPayer = function(patient, initialSpecificContext) {\n var value = patient.payer() || null;\n matching = matchingValue(value, null);\n matching.specificContext=hqmf.SpecificsManager.identity();\n return matching;\n}\n\nhqmfjs.PatientCharacteristicRaceRace = function(patient, initialSpecificContext) {\n var value = patient.race() || null;\n matching = new Boolean(value.includedIn({\"CDC Race\":[\"1002-5\",\"2028-9\",\"2054-5\",\"2076-8\",\"2106-3\",\"2131-1\"]}));\n matching.specificContext=hqmf.SpecificsManager.identity();\n return matching;\n}\n\nhqmfjs.PatientCharacteristicBirthdateBirthdate_precondition_1 = function(patient, initialSpecificContext) {\n var value = patient.birthtime() || null;\n var events = value ? [value] : [];\n events = SBS(events, hqmfjs.MeasurePeriod(patient), new IVL_PQ(new PQ(1, \"a\", true), null));\n events.specificContext=events.specificContext||hqmf.SpecificsManager.identity();\n return events;\n}\n\nhqmfjs.PatientCharacteristicBirthdateBirthdate_precondition_2 = function(patient, initialSpecificContext) {\n var value = patient.birthtime() || null;\n var events = value ? [value] : [];\n events = SBS(events, hqmfjs.MeasurePeriod(patient), new IVL_PQ(new PQ(10, \"a\", false), null));\n events.specificContext=events.specificContext||hqmf.SpecificsManager.identity();\n return events;\n}\n\n\n\n // #########################\n // ##### MEASURE LOGIC #####\n // #########################\n \n hqmfjs.initializeSpecifics = function(patient_api, hqmfjs) { hqmf.SpecificsManager.initialize(patient_api,hqmfjs) }\n\n // INITIAL PATIENT POPULATION\n hqmfjs.IPP = function(patient, initialSpecificContext) {\n population_criteria_fn = allTrue('IPP', patient, initialSpecificContext,\n allTrue('3', patient, initialSpecificContext, hqmfjs.PatientCharacteristicBirthdateBirthdate_precondition_1\n )\n );\n if (typeof(population_criteria_fn) == 'function') {\n \treturn population_criteria_fn();\n } else {\n \treturn population_criteria_fn;\n }\n};\n\n\n // STRATIFICATION\n hqmfjs.STRAT=null;\n // DENOMINATOR\n hqmfjs.DENOM = function(patient, initialSpecificContext) {\n population_criteria_fn = allTrue('DENOM', patient, initialSpecificContext,\n allTrue('5', patient, initialSpecificContext, hqmfjs.PatientCharacteristicBirthdateBirthdate_precondition_1\n )\n );\n if (typeof(population_criteria_fn) == 'function') {\n \treturn population_criteria_fn();\n } else {\n \treturn population_criteria_fn;\n }\n};\n\n\n // NUMERATOR\n hqmfjs.NUMER = function(patient, initialSpecificContext) {\n population_criteria_fn = allTrue('NUMER', patient, initialSpecificContext,\n allTrue('7', patient, initialSpecificContext, hqmfjs.PatientCharacteristicBirthdateBirthdate_precondition_2\n )\n );\n if (typeof(population_criteria_fn) == 'function') {\n \treturn population_criteria_fn();\n } else {\n \treturn population_criteria_fn;\n }\n};\n\n\n hqmfjs.DENEX = function(patient) { return new Boolean(false); }\n hqmfjs.DENEXCEP = function(patient) { return new Boolean(false); }\n // CV\n hqmfjs.MSRPOPL = function(patient) { return new Boolean(false); }\n hqmfjs.OBSERV = function(patient) { return new Boolean(false); }\n \n \n var occurrenceId = null;\n\n hqmfjs.initializeSpecifics(patient_api, hqmfjs)\n \n var population = function() {\n return executeIfAvailable(hqmfjs.IPP, patient_api);\n }\n var stratification = null;\n if (hqmfjs.STRAT) {\n stratification = function() {\n return hqmf.SpecificsManager.setIfNull(executeIfAvailable(hqmfjs.STRAT, patient_api));\n }\n }\n var denominator = function() {\n return executeIfAvailable(hqmfjs.DENOM, patient_api);\n }\n var numerator = function() {\n return executeIfAvailable(hqmfjs.NUMER, patient_api);\n }\n var exclusion = function() {\n return executeIfAvailable(hqmfjs.DENEX, patient_api);\n }\n var denexcep = function() {\n return executeIfAvailable(hqmfjs.DENEXCEP, patient_api);\n }\n var msrpopl = function() {\n return executeIfAvailable(hqmfjs.MSRPOPL, patient_api);\n }\n var observ = function(specific_context) {\n \n var observFunc = hqmfjs.OBSERV\n if (typeof(observFunc)==='function')\n return observFunc(patient_api, specific_context);\n else\n return [];\n }\n \n var executeIfAvailable = function(optionalFunction, patient_api) {\n if (typeof(optionalFunction)==='function') {\n result = optionalFunction(patient_api);\n \n return result;\n } else {\n return false;\n }\n }\n\n \n if (typeof Logger != 'undefined') {\n // clear out logger\n Logger.logger = [];\n Logger.rationale={};\n if (typeof short_circuit == 'undefined') short_circuit = true;\n \n // turn on logging if it is enabled\n if (enable_logging || enable_rationale) {\n injectLogger(hqmfjs, enable_logging, enable_rationale, short_circuit);\n } \n }\n\n try {\n map(patient, population, denominator, numerator, exclusion, denexcep, msrpopl, observ, occurrenceId,false,stratification);\n } catch(err) {\n print(err.stack);\n throw err;\n }\n\n \n };\n ", :reduce=>"function(key, values){return values;}", :out=>{:reduce=>"patient_cache", :sharded=>true}, :finalize=>"function (key, value) { \n var patient = value;\n patient.measure_id = \"402881E9-4A05-C2D1-014A-05CCD10D0008\";\n patient.nqf_id = \"111\";\npatient.effective_date = 1356998340;\n if (patient.provider_performances) {\n var tmp = [];\n for(var i=0; i<patient.provider_performances.length; i++) {\n var value = patient.provider_performances[i];\n if ((value['start_date'] <= 1356998340 || value['start_date'] == null) && (value['end_date'] >= 1356998340 || value['end_date'] == null))\n tmp.push(value);\n }\n if (tmp.length == 0) tmp = null;\n patient.provider_performances = tmp;\n }\n return patient;}", :query=>{}}
@fields=nil>
failed with error 16722: "exception: SyntaxError: Unexpected token ;"
See https://github.com/mongodb/mongo/blob/master/docs/errors.md
for details about this error. - 1 failed attempts
[Worker(host:xxx pid:8484)] 1 jobs processed at 3.5978 j/s, 1 failed ...
If possible, please provide solution for this MeasureCalculation problem. I have tried other available solution like switching to earlier versions, but they also fail for new measureCalculationJob which are created through MAT->bonnie->pophealth.
Any help will be appreciated!!!
You guys are posting in the incorrect repository. Please see the note at the top of
Any issues you have need to be posted to the osehra repository.
And yes, there are issues with the latest version of the measure bundle along with any output from bonnie, which the latest bundle is based off of.
On Mon, Dec 22, 2014 at 8:35 AM, Vais Salikhov notifications@github.com wrote:
@Ashish101 https://github.com/Ashish101 I would love to be able to say I understand any of this deeply, but I am in fact just another miserable sole that had to suffer through this software :) Hope more knowledgeable people can chime in on the status of this project...
— Reply to this email directly or view it on GitHub https://github.com/pophealth/popHealth/issues/268#issuecomment-67837418.
@rdingwell could someone with commit rights to this repo update the home page (README.md) to point people at the correct repository? This is really confusing, would you agree?
I have followed the latest installation instructions to the letter, and I am running into the #39 issue with delayed job execution -
failed with error 16722: "exception: SyntaxError: Unexpected token ;"
Downgrading fixed the issue, so I believe this is a problem somewhere between the current popHealth source code, the gem versions it uses, and the version of the measures bundle that gets imported.
Here is what fixed the issue for me:
git reset --hard eb00169578
bundle install
againcurl -u NLM_USERNAME:NLM_PASSWORD http://demo.projectcypress.org/bundles/bundle-2.4.0.zip -o ../bundle-2.4.0.zip
bundle exec rake bundle:import[../bundle-2.4.0.zip,false,false,'*',true,true]
Please try installing using the latest instructions and you are guaranteed to reproduce this error.