plan_executor 1.0.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -2
- data/Gemfile +3 -6
- data/Gemfile.lock +52 -48
- data/README.md +2 -2
- data/fixtures/attachment/ccda_pdf.pdf +0 -0
- data/fixtures/attachment/ccda_pdf_base64.txt +2489 -0
- data/fixtures/attachment/ccda_structured.xml +1976 -0
- data/fixtures/attachment/ccda_unstructured.xml +2563 -0
- data/fixtures/daf/conformance-daf-query-responder.xml +2024 -193
- data/fixtures/diagnostic_report/diagnosticreport-familyhistory-create.xml +67 -0
- data/fixtures/diagnostic_report/diagnosticreport-hlatyping-create.xml +64 -0
- data/fixtures/diagnostic_report/diagnosticreport-pathologyreport-create.xml +312 -0
- data/fixtures/diagnostic_report/dr-100.xml +3 -3
- data/fixtures/diagnostic_report/dr-200.xml +5 -5
- data/fixtures/diagnostic_report/dr-300.xml +3 -3
- data/fixtures/diagnostic_report/dr-400.xml +3 -3
- data/fixtures/{diagnostic_order → diagnostic_request}/do-100.xml +57 -64
- data/fixtures/diagnostic_request/do-200.xml +73 -0
- data/fixtures/{diagnostic_order → diagnostic_request}/do-300.xml +73 -91
- data/{lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticOrder → fixtures/diagnostic_request}/do-400.xml +74 -88
- data/fixtures/family_member_history/familymemberhistory-familyhistory-create.xml +27 -0
- data/fixtures/financial/claim-example-oral-average.xml +199 -0
- data/fixtures/financial/claim-example-oral-orthoplan.xml +298 -0
- data/fixtures/financial/claim-example.xml +98 -0
- data/fixtures/financial/eligibilityrequest-example.xml +40 -0
- data/fixtures/observation/obs-401.xml +7 -17
- data/fixtures/observation/obs-402.xml +7 -17
- data/fixtures/observation/obs-403.xml +4 -29
- data/fixtures/observation/obs-407.xml +4 -11
- data/fixtures/observation/observation-datawarehouse-create.xml +72 -0
- data/fixtures/observation/observation-familyhistory-create.xml +61 -0
- data/fixtures/observation/observation-germline-create.xml +72 -0
- data/fixtures/observation/observation-register-create.xml +72 -0
- data/fixtures/patch/medicationrequest-simple.xml +16 -0
- data/fixtures/patient/patient-example-updated.xml +1 -7
- data/fixtures/patient/patient-example-us-extensions.xml +119 -0
- data/fixtures/patient/patient-example.xml +46 -27
- data/fixtures/patient/patient-familyhistory-create.xml +45 -0
- data/fixtures/patient/patient-register-create.xml +47 -0
- data/fixtures/practitioner/practitioner-register-create.xml +32 -0
- data/fixtures/record/condition-example-f201-fever.xml +54 -49
- data/fixtures/record/condition-example-f205-infection.xml +16 -15
- data/fixtures/record/diagnosticreport-example-f201-brainct.xml +45 -18
- data/fixtures/record/encounter-example-f201-20130404.xml +42 -15
- data/fixtures/record/encounter-example-f202-20130128.xml +57 -15
- data/fixtures/record/observation-example-f202-temperature.xml +85 -60
- data/fixtures/record/organization-example-f201-aumc.xml +87 -4
- data/fixtures/record/organization-example-f203-bumc.xml +53 -4
- data/fixtures/record/patient-example-f201-roel.xml +108 -8
- data/fixtures/record/practitioner-example-f201-ab.xml +73 -14
- data/fixtures/record/procedure-example-f201-tpf.xml +39 -9
- data/fixtures/scheduling/slot-simple.xml +1 -1
- data/fixtures/sequence/sequence-register-create.xml +31 -0
- data/fixtures/specimen/spec-100.xml +8 -8
- data/fixtures/specimen/spec-400.xml +11 -11
- data/fixtures/specimen/spec-uslab-example1.xml +11 -11
- data/fixtures/specimen/specimen-familyhistory-create.xml +54 -0
- data/fixtures/specimen/specimen-register-create.xml +49 -0
- data/fixtures/terminology/codesystem-data-types.json +230 -0
- data/fixtures/terminology/codesystem-resource-types.json +482 -0
- data/fixtures/terminology/codesystem-simple.xml +129 -0
- data/fixtures/terminology/conceptmap-example.xml +141 -0
- data/fixtures/terminology/v2-codesystem.json +1297 -0
- data/fixtures/terminology/v2-valueset.json +16 -0
- data/fixtures/terminology/valueset-defined-types.json +25 -0
- data/fixtures/terminology/valueset-example.xml +111 -0
- data/fixtures/validation/observation.profile.xml +1534 -253
- data/fixtures/validation/observations/observation-example.xml +66 -0
- data/lib/FHIR_structure.json +129 -82
- data/lib/daf_resource_generator.rb +7 -7
- data/lib/data/resources.rb +50 -30
- data/lib/ext/client.rb +2 -2
- data/lib/plan_executor.rb +6 -1
- data/lib/resource_generator.rb +413 -212
- data/lib/tasks/tasks.rake +151 -20
- data/lib/tests/assertions.rb +24 -18
- data/lib/tests/base_test.rb +17 -3
- data/lib/tests/suites/argonaut_provider_connectathon_test.rb +234 -0
- data/lib/tests/suites/base_suite.rb +7 -3
- data/lib/tests/suites/connectathon_attachment_track_test.rb +124 -0
- data/lib/tests/suites/connectathon_audit_track.rb +113 -69
- data/lib/tests/suites/connectathon_care_plan_track.rb +237 -0
- data/lib/tests/suites/connectathon_fetch_patient_record.rb +40 -39
- data/lib/tests/suites/connectathon_financial_track.rb +231 -23
- data/lib/tests/suites/connectathon_genomics_track_test.rb +255 -0
- data/lib/tests/suites/connectathon_lab_order_track.rb +131 -104
- data/lib/tests/suites/connectathon_patch_track.rb +125 -0
- data/lib/tests/suites/connectathon_patient_track.rb +75 -68
- data/lib/tests/suites/connectathon_profile_validation.rb +9 -8
- data/lib/tests/suites/connectathon_scheduling_track.rb +127 -70
- data/lib/tests/suites/connectathon_terminology_track.rb +211 -34
- data/lib/tests/suites/daf_profiles_test.rb +112 -72
- data/lib/tests/suites/format_test.rb +113 -255
- data/lib/tests/suites/history_test.rb +72 -68
- data/lib/tests/suites/read_test.rb +31 -27
- data/lib/tests/suites/resource_test.rb +283 -85
- data/lib/tests/suites/search_test.rb +5 -3
- data/lib/tests/suites/search_test_robust.rb +8 -76
- data/lib/tests/suites/sprinkler_search_test.rb +104 -84
- data/lib/tests/suites/suite_engine.rb +17 -23
- data/lib/tests/suites/transaction_test.rb +117 -174
- data/lib/tests/testscripts/base_testscript.rb +425 -189
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/Client Assigned Id/connectathon-14-patient-base-client-id-json.xml +517 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/Client Assigned Id/connectathon-14-patient-base-client-id-xml.xml +517 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/Client Assigned Id/connectathon-14-patient-bonus-client-id-json.xml +648 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/Client Assigned Id/connectathon-14-patient-bonus-client-id-xml.xml +648 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/README.html +68 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/Server Assigned Id/connectathon-14-patient-base-server-id-json.xml +515 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/Server Assigned Id/connectathon-14-patient-base-server-id-xml.xml +515 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/Server Assigned Id/connectathon-14-patient-bonus-server-id-json.xml +645 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/Server Assigned Id/connectathon-14-patient-bonus-server-id-xml.xml +642 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/_reference/capabilities/PatientCapabilityStatement.xml +43 -0
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-create-PeterChalmers-min.json +1 -3
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-create-PeterChalmers-min.xml +0 -0
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-create-PeterChalmers.json +5 -10
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-create-PeterChalmers.xml +5 -5
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-create-bonus-PeterChalmers-min.json +1 -3
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-create-bonus-PeterChalmers-min.xml +0 -0
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-create-bonus-PeterChalmers.json +5 -10
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-create-bonus-PeterChalmers.xml +4 -5
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/_reference/resources/patient-create-client-id-PeterChalmers.json +96 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/_reference/resources/patient-create-client-id-PeterChalmers.xml +103 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/_reference/resources/patient-create-client-id-bonus-PeterChalmers.json +104 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-01-Intro/_reference/resources/patient-create-client-id-bonus-PeterChalmers.xml +108 -0
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-PeterChalmers-min.json +1 -3
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-PeterChalmers-min.xml +0 -0
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-PeterChalmers.json +6 -10
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-PeterChalmers.xml +6 -5
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-bonus1-PeterChalmers-min.json +1 -3
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-bonus1-PeterChalmers-min.xml +0 -0
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-bonus1-PeterChalmers.json +7 -11
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-bonus1-PeterChalmers.xml +5 -5
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-bonus2-PeterChalmers-min.json +2 -4
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-bonus2-PeterChalmers-min.xml +1 -1
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-bonus2-PeterChalmers.json +7 -11
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient → scripts/connectathon/Patient-01-Intro}/_reference/resources/patient-update-bonus2-PeterChalmers.xml +8 -7
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/01-RegisterPatient/connectathon-14-patient-fhirclient-01-register-client-id-xml.xml +306 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/01-RegisterPatient/connectathon-14-patient-fhirclient-01-register-server-id-xml.xml +317 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/02-PatientUpdate/connectathon-14-patient-fhirclient-02-update-client-id-xml.xml +346 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/02-PatientUpdate/connectathon-14-patient-fhirclient-02-update-server-id-xml.xml +385 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/capabilities/PatientCapabilityStatement.json +50 -0
- data/lib/tests/testscripts/{xml/Connectathon11/Track1-Patient/_reference/conformance/PatientConformance.xml → scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/capabilities/PatientCapabilityStatement.xml} +10 -2
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/resources/patient-create-client-id.json +21 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/resources/patient-create-client-id.xml +15 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/resources/patient-create-server-id.json +20 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/resources/patient-create-server-id.xml +14 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/resources/patient-update-client-id.json +21 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/resources/patient-update-client-id.xml +15 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/resources/patient-update-server-id.json +20 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRClient/_reference/resources/patient-update-server-id.xml +14 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/01-RegisterPatient/connectathon-14-patient-fhirserver-01-register-client-id-json.xml +262 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/01-RegisterPatient/connectathon-14-patient-fhirserver-01-register-client-id-xml.xml +262 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/01-RegisterPatient/connectathon-14-patient-fhirserver-01-register-server-id-json.xml +273 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/01-RegisterPatient/connectathon-14-patient-fhirserver-01-register-server-id-xml.xml +273 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/02-PatientUpdate/connectathon-14-patient-fhirserver-02-update-client-id-json.xml +290 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/02-PatientUpdate/connectathon-14-patient-fhirserver-02-update-client-id-xml.xml +290 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/02-PatientUpdate/connectathon-14-patient-fhirserver-02-update-server-id-json.xml +326 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/02-PatientUpdate/connectathon-14-patient-fhirserver-02-update-server-id-xml.xml +326 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/03-PatientRead/connectathon-14-patient-fhirserver-03-read-client-id-json.xml +247 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/03-PatientRead/connectathon-14-patient-fhirserver-03-read-client-id-xml.xml +247 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/03-PatientRead/connectathon-14-patient-fhirserver-03-read-server-id-json.xml +282 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/03-PatientRead/connectathon-14-patient-fhirserver-03-read-server-id-xml.xml +281 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/04-PatientHistory/connectathon-14-patient-fhirserver-04-history-client-id-json.xml +330 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/04-PatientHistory/connectathon-14-patient-fhirserver-04-history-client-id-xml.xml +330 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/04-PatientHistory/connectathon-14-patient-fhirserver-04-history-server-id-json.xml +366 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/04-PatientHistory/connectathon-14-patient-fhirserver-04-history-server-id-xml.xml +366 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/05-PatientVRead/connectathon-14-patient-fhirserver-05-vread-client-id-json.xml +527 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/05-PatientVRead/connectathon-14-patient-fhirserver-05-vread-client-id-xml.xml +527 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/05-PatientVRead/connectathon-14-patient-fhirserver-05-vread-server-id-json.xml +519 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/05-PatientVRead/connectathon-14-patient-fhirserver-05-vread-server-id-xml.xml +519 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/06-PatientSearching/connectathon-14-patient-fhirserver-06-search-client-id-json.xml +290 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/06-PatientSearching/connectathon-14-patient-fhirserver-06-search-client-id-xml.xml +290 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/06-PatientSearching/connectathon-14-patient-fhirserver-06-search-server-id-json.xml +288 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/06-PatientSearching/connectathon-14-patient-fhirserver-06-search-server-id-xml.xml +288 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/07-PatientDeletion/connectathon-14-patient-fhirserver-07-delete-client-id-json.xml +252 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/07-PatientDeletion/connectathon-14-patient-fhirserver-07-delete-client-id-xml.xml +252 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/07-PatientDeletion/connectathon-14-patient-fhirserver-07-delete-server-id-json.xml +284 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/07-PatientDeletion/connectathon-14-patient-fhirserver-07-delete-server-id-xml.xml +284 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/99-PatientAll/connectathon-14-patient-fhirserver-99-all-client-id-json.xml +897 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/99-PatientAll/connectathon-14-patient-fhirserver-99-all-client-id-xml.xml +897 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/99-PatientAll/connectathon-14-patient-fhirserver-99-all-server-id-json.xml +963 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/99-PatientAll/connectathon-14-patient-fhirserver-99-all-server-id-xml.xml +963 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/capabilities/PatientCapabilityStatement.json +50 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/capabilities/PatientCapabilityStatement.xml +42 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/resources/patient-create-client-id.json +86 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/resources/patient-create-client-id.xml +62 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/resources/patient-create-server-id.json +85 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/resources/patient-create-server-id.xml +61 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/resources/patient-update-client-id.json +86 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/resources/patient-update-client-id.xml +62 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/resources/patient-update-server-id.json +86 -0
- data/lib/tests/testscripts/scripts/connectathon/Patient-02-Formal/FHIRServer/_reference/resources/patient-update-server-id.xml +62 -0
- data/lib/tests/testscripts/scripts/spec/_reference/resources/patient-example-update.json +145 -0
- data/lib/tests/testscripts/scripts/spec/_reference/resources/patient-example.json +146 -0
- data/lib/tests/testscripts/scripts/spec/testscript-example-history.xml +191 -0
- data/lib/tests/testscripts/scripts/spec/testscript-example-multisystem.xml +190 -0
- data/lib/tests/testscripts/scripts/spec/testscript-example-readtest.xml +178 -0
- data/lib/tests/testscripts/scripts/spec/testscript-example-rule.xml +266 -0
- data/lib/tests/testscripts/scripts/spec/testscript-example-search.xml +177 -0
- data/lib/tests/testscripts/scripts/spec/testscript-example-update.xml +163 -0
- data/lib/tests/testscripts/scripts/spec/testscript-example.xml +228 -0
- data/lib/tests/testscripts/testscript_engine.rb +36 -22
- data/logs/.keep +0 -0
- data/plan_executor.gemspec +11 -3
- data/test/test_helper.rb +3 -3
- data/test/unit/fixtures_test.rb +24 -24
- data/test/unit/metadata_test.rb +19 -9
- data/test/unit/resource_generator_test.rb +20 -0
- metadata +244 -249
- data/fixtures/diagnostic_order/do-200.xml +0 -121
- data/fixtures/diagnostic_order/do-400.xml +0 -88
- data/fixtures/financial/claim-example-average.xml +0 -168
- data/fixtures/financial/claim-example-simple.xml +0 -67
- data/fixtures/order/order-100.xml +0 -61
- data/fixtures/order/order-200.xml +0 -61
- data/fixtures/order/order-300.xml +0 -61
- data/fixtures/order/order-400.xml +0 -61
- data/fixtures/order_response/ordresp-100.xml +0 -79
- data/fixtures/order_response/ordresp-110.xml +0 -79
- data/fixtures/order_response/ordresp-200.xml +0 -79
- data/fixtures/order_response/ordresp-210.xml +0 -79
- data/fixtures/order_response/ordresp-300.xml +0 -79
- data/fixtures/order_response/ordresp-310.xml +0 -79
- data/fixtures/order_response/ordresp-400.xml +0 -79
- data/fixtures/order_response/ordresp-410.xml +0 -79
- data/fixtures/patient/patient-example-us-extensions(us01).xml +0 -81
- data/fixtures/patient/patient-format-example.xml +0 -101
- data/fixtures/validation/observations/observation-example(example).xml +0 -50
- data/lib/tests/suites/argonaut_resprint_1_test.rb +0 -260
- data/lib/tests/suites/argonaut_resprint_2_test.rb +0 -369
- data/lib/tests/suites/argonaut_resprint_3_test.rb +0 -309
- data/lib/tests/suites/argonaut_sprint_1_test.rb +0 -187
- data/lib/tests/suites/argonaut_sprint_2_test.rb +0 -115
- data/lib/tests/suites/argonaut_sprint_3_test.rb +0 -208
- data/lib/tests/suites/argonaut_sprint_4_test.rb +0 -335
- data/lib/tests/suites/argonaut_sprint_5_test.rb +0 -196
- data/lib/tests/suites/argonaut_sprint_6_test.rb +0 -243
- data/lib/tests/suites/argonaut_sprint_7_test.rb +0 -161
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/Client Assigned Id/track1-patient-base-client-id-json.xml +0 -348
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/Client Assigned Id/track1-patient-base-client-id-xml.xml +0 -348
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/Client Assigned Id/track1-patient-bonus-client-id-json.xml +0 -420
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/Client Assigned Id/track1-patient-bonus-client-id-xml.xml +0 -420
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/README.html +0 -68
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/Server Assigned Id/track1-patient-base-server-id-json.xml +0 -352
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/Server Assigned Id/track1-patient-base-server-id-xml.xml +0 -352
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/Server Assigned Id/track1-patient-bonus-server-id-json.xml +0 -421
- data/lib/tests/testscripts/xml/Connectathon11/Track1-Patient/Server Assigned Id/track1-patient-bonus-server-id-xml.xml +0 -421
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/C-CDA_R2-1_CCD-ussg.xml +0 -3414
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/parameters-A1-empty-on-instance.xml +0 -9
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/parameters-A2-empty-by-ref.xml +0 -15
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/parameters-A3-empty-by-identifier.xml +0 -13
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/parameters-A4-empty-by-contained.xml +0 -15
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/parameters-B1-CCDA-on-instance.xml +0 -15
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/parameters-B2-CCDA-by-ref.xml +0 -21
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/parameters-B3-CCDA-by-identifier.xml +0 -19
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/parameters-B4-CCDA-by-contained.xml +0 -21
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/questionnaire-sdc-profile-example-ussg-fht.xml +0 -3905
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/questionnaireresponse-expected-ussg-fht-CCDA.xml +0 -190
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/_reference/resources/questionnaireresponse-expected-ussg-fht-empty.xml +0 -177
- data/lib/tests/testscripts/xml/Connectathon11/Track11-SDC/track11-sdc-prepop-xml.xml +0 -142
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Expand/Client Assigned Id/track2-ts-suite1-expand-client-id.xml +0 -925
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Expand/Client Assigned Id/track2-ts-suite2-expand-filter-client-id.xml +0 -930
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Expand/Server Assigned Id/track2-ts-suite1-expand-server-id.xml +0 -953
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Expand/Server Assigned Id/track2-ts-suite2-expand-filter-server-id.xml +0 -958
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Lookup/track2-ts-suite5-loinc-lookup-xml.xml +0 -224
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Lookup/track2-ts-suite5-snomed-lookup-xml.xml +0 -224
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/README.html +0 -85
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Translate/track2-ts-suite6-translate-xml.xml +0 -224
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Validate-code/Client Assigned Id/track2-ts-suite3-validate-code-client-id.xml +0 -1807
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Validate-code/Client Assigned Id/track2-ts-suite4-validate-code-client-id.xml +0 -714
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Validate-code/Server Assigned Id/track2-ts-suite3-validate-code-server-id.xml +0 -1835
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/Validate-code/Server Assigned Id/track2-ts-suite4-validate-code-server-id.xml +0 -742
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/conformance/ConceptMapSuite6Conformance.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/conformance/ValueSetSuite1Conformance.xml +0 -17
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/conformance/ValueSetSuite2Conformance.xml +0 -17
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/conformance/ValueSetSuite3Conformance.xml +0 -14
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/conformance/ValueSetSuite4Conformance.xml +0 -14
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/conformance/ValueSetSuite5Conformance.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/extensional-case-1-input-4-2-a.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/extensional-case-1-input-4-2-b.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/extensional-case-1-input-4-3-a.xml +0 -13
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/extensional-case-1-input-4-3-b.xml +0 -13
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/extensional-case-1-input-4-4-a.xml +0 -15
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/extensional-case-1-input-4-4-b.xml +0 -15
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/lookup-loinc-input-5-2.xml +0 -10
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/lookup-loinc-input-5-3.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/lookup-snomed-input-5-2.xml +0 -10
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/lookup-snomed-input-5-3.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/translate-conceptmap-input-6-2.xml +0 -14
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/input/translate-conceptmap-input-6-3.xml +0 -15
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/extensional-case-1-expand-min.xml +0 -47
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/extensional-case-1-filter-min.xml +0 -23
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/extensional-case-2-expand-min.xml +0 -132
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/extensional-case-2-filter-min.xml +0 -38
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/extensional-case-3-expand-min.xml +0 -252
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/extensional-case-3-filter-min.xml +0 -58
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/extensional-case-4-expand-min.xml +0 -57
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/extensional-case-4-filter-min.xml +0 -28
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/intensional-case-1-expand-min.xml +0 -347
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/intensional-case-1-filter-min.xml +0 -33
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/intensional-case-2-expand-min.xml +0 -637
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/intensional-case-2-filter-min.xml +0 -33
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/intensional-case-3-filter-min.xml +0 -58
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/lookup-loinc-min.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/lookup-snomed-min.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/suite3-invalid-min.xml +0 -10
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/suite3-valid-min.xml +0 -7
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/suite4-invalid-min.xml +0 -10
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/suite4-valid-min.xml +0 -7
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/output/translate-conceptmap-min.xml +0 -17
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/resources/extensional-case-1.xml +0 -55
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/resources/extensional-case-2.xml +0 -122
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/resources/extensional-case-3.xml +0 -222
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/resources/extensional-case-4.xml +0 -65
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/resources/intensional-case-1.xml +0 -31
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/resources/intensional-case-2.xml +0 -31
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/resources/intensional-case-3.xml +0 -31
- data/lib/tests/testscripts/xml/Connectathon11/Track2-Terminology/_reference/resources/translate-conceptmap-case-1.xml +0 -145
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/conformance/DecisionSupportServiceModule-Evaluate.xml +0 -17
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-incomplete-request-payload.xml +0 -26
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-incomplete-response-min-payload.xml +0 -7
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-incomplete-response-payload.xml +0 -332
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-malformed-request-payload.xml +0 -28
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-malformed-response-min-payload.xml +0 -7
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-malformed-response-payload.xml +0 -20
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-request-payload.xml +0 -28
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-response-min-payload.xml +0 -7
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-response-payload.xml +0 -332
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-unauthorized-request-payload.xml +0 -28
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-unauthorized-response-min-payload.xml +0 -7
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/ecrs-fhir-cdc-immunizations-unauthorized-response-payload.xml +0 -8
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/gao-assessment-request-payload.xml +0 -176
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/gao-assessment-response-payload-min.xml +0 -32
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/_reference/resources/gao-assessment-response-payload.xml +0 -80
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/track3-cds-evaluate-cdc-immunization.xml +0 -290
- data/lib/tests/testscripts/xml/Connectathon11/Track3-CDS-on-FHIR/track3-cds-evaluate-gao-profile.xml +0 -110
- data/lib/tests/testscripts/xml/Connectathon11/Track6-FHIR-Genomics/Client_Assigned_Id/TestScript_FHIR-Genomics.xml +0 -170
- data/lib/tests/testscripts/xml/Connectathon11/Track6-FHIR-Genomics/_reference/resources/sequence-example-1.xml +0 -31
- data/lib/tests/testscripts/xml/Connectathon11/Track6-FHIR-Genomics/_reference/resources/sequence-example-2.xml +0 -31
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/Actors.png +0 -0
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/Client_Assigned_Id/track7-laborder100-xml.xml +0 -590
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/Client_Assigned_Id/track7-laborder200-xml.xml +0 -587
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/Client_Assigned_Id/track7-laborder300-xml.xml +0 -612
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/Client_Assigned_Id/track7-laborder400-xml.xml +0 -635
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/Peer-to-Peer/track7-laborder100-peer2peer-xml.xml +0 -752
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/Thumbs.db +0 -0
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/conformance/LabOrderLabReport-CreateDeleteReadUpdate.xml +0 -187
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/conformance/html.xslt +0 -45
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticOrder/do-100-update.xml +0 -64
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticOrder/do-100.xml +0 -64
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticOrder/do-200-update.xml +0 -121
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticOrder/do-200.xml +0 -121
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticOrder/do-300-update.xml +0 -91
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticOrder/do-300.xml +0 -91
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticOrder/do-400-update.xml +0 -88
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticReport/dr-100.xml +0 -96
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticReport/dr-200.xml +0 -125
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticReport/dr-300.xml +0 -132
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/DiagnosticReport/dr-400.xml +0 -121
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-100.xml +0 -58
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-101.xml +0 -58
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-200.xml +0 -125
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-300.xml +0 -106
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-301.xml +0 -106
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-302.xml +0 -106
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-303.xml +0 -106
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-304.xml +0 -106
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-400.xml +0 -87
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-401.xml +0 -95
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-402.xml +0 -95
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-403.xml +0 -84
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-404.xml +0 -84
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-405.xml +0 -83
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-406.xml +0 -83
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-407.xml +0 -70
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-408.xml +0 -84
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Observation/obs-uslab-example5.xml +0 -102
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Order/order-100.xml +0 -61
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Order/order-200.xml +0 -61
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Order/order-300.xml +0 -61
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Order/order-400.xml +0 -61
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/OrderResponse/ordresp-100.xml +0 -79
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/OrderResponse/ordresp-110.xml +0 -79
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/OrderResponse/ordresp-200.xml +0 -79
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/OrderResponse/ordresp-210.xml +0 -79
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/OrderResponse/ordresp-300.xml +0 -79
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/OrderResponse/ordresp-310.xml +0 -79
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/OrderResponse/ordresp-400.xml +0 -79
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/OrderResponse/ordresp-410.xml +0 -79
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Organization/org-uslab-example3.xml +0 -49
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Patient/patient-uslab-example1.xml +0 -44
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Practitioner/pract-uslab-example1.xml +0 -18
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Practitioner/pract-uslab-example3.xml +0 -36
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Specimen/Thumbs.db +0 -0
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Specimen/spec-100.xml +0 -65
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Specimen/spec-400.xml +0 -70
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Specimen/spec-uslab-example1.xml +0 -82
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Testscript 1 Document.txt +0 -122
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Testscript 2 Document.txt +0 -103
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Testscript 3 Document.txt +0 -201
- data/lib/tests/testscripts/xml/Connectathon11/Track7-LabOrderLabReport/_reference/resources/Testscript 4 Document.txt +0 -310
- data/lib/tests/testscripts/xml/Connectathon11/Track9-Patch/_reference/conformance/MedicationStatementCreate.xml +0 -11
- data/lib/tests/testscripts/xml/Connectathon11/Track9-Patch/_reference/conformance/PatientSearchType.xml +0 -15
- data/lib/tests/testscripts/xml/Connectathon11/Track9-Patch/_reference/resources/medicationstatement-create.json +0 -39
- data/lib/tests/testscripts/xml/Connectathon11/Track9-Patch/_reference/resources/medicationstatement-patch.json +0 -3
- data/lib/tests/testscripts/xml/Connectathon11/Track9-Patch/track9-patch-medicationstatement-json-if-match.xml +0 -321
- data/lib/tests/testscripts/xml/Connectathon11/Track9-Patch/track9-patch-medicationstatement-json.xml +0 -303
- data/lib/tests/testscripts/xml/Connectathon11/Track9-Patch/track9-patch-peer2peer-patient-json.xml +0 -235
- data/test/fixtures/testscript-example.xml +0 -202
- data/test/fixtures/testscript-history.xml +0 -143
- data/test/fixtures/testscript-readtest.xml +0 -272
- data/test/fixtures/testscript-search.xml +0 -282
- data/test/fixtures/testscript-update.xml +0 -147
- data/test/unit/argonaut_sprint6_test.rb +0 -31
- data/test/unit/argonaut_sprint7_test.rb +0 -21
- data/test/unit/basic_test.rb +0 -27
- data/test/unit/fetch_patient_record_test.rb +0 -357
- data/test/unit/financial_test.rb +0 -41
@@ -0,0 +1,234 @@
|
|
1
|
+
module Crucible
|
2
|
+
module Tests
|
3
|
+
class ArgonautProviderConnectathonTest < BaseSuite
|
4
|
+
def id
|
5
|
+
'ArgonautProviderConnectathonTest'
|
6
|
+
end
|
7
|
+
|
8
|
+
def description
|
9
|
+
'Test suite for the Argonaut Provider Directory Virtual Connectathon'
|
10
|
+
end
|
11
|
+
|
12
|
+
def details
|
13
|
+
{
|
14
|
+
'Overview' => 'Test suite for the Argonaut Provider Directory Virtual Connectathon'
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(client1, client2 = nil)
|
19
|
+
super(client1, client2)
|
20
|
+
@tags.append('provider')
|
21
|
+
@tags.append('connectathon')
|
22
|
+
@category = {id: 'argonaut', title: 'Argonaut'}
|
23
|
+
end
|
24
|
+
|
25
|
+
test 'APCT01', 'GET a set of Practitioners to test' do
|
26
|
+
metadata {
|
27
|
+
links "#{REST_SPEC_LINK}#read"
|
28
|
+
links "#{REST_SPEC_LINK}#search"
|
29
|
+
requires resource: 'Practitioner', methods: ['read', 'search']
|
30
|
+
validates resource: 'Practitioner', methods: ['read', 'search']
|
31
|
+
}
|
32
|
+
|
33
|
+
# Basically just get a group of 10 Practitioners
|
34
|
+
options = {
|
35
|
+
:search => {
|
36
|
+
# :flag => true,
|
37
|
+
:compartment => nil,
|
38
|
+
:parameters => {
|
39
|
+
_count: 100
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
result = @client.search(FHIR::Practitioner, options)
|
45
|
+
|
46
|
+
assert_response_ok(result)
|
47
|
+
|
48
|
+
@practitioners = result.resource.try(:entry)
|
49
|
+
|
50
|
+
assert @practitioners, 'No Practitioners found'
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
test 'APCT02', 'Test ability to locate a Practitioner\'s Telecom/Physical Address' do
|
55
|
+
metadata {
|
56
|
+
links "#{REST_SPEC_LINK}#read"
|
57
|
+
requires resource: 'Practitioner', methods: ['read']
|
58
|
+
validates resource: 'Practitioner', methods: ['read']
|
59
|
+
}
|
60
|
+
|
61
|
+
skip if !@practitioners
|
62
|
+
|
63
|
+
practitioner_id = @practitioners.select{ |p| !p.resource.role.empty? }.sample.try(:resource).try(:id)
|
64
|
+
assert practitioner_id, 'No practitioner found with a role'
|
65
|
+
|
66
|
+
@practitioner = @client.read(FHIR::Practitioner, practitioner_id).try(:resource)
|
67
|
+
|
68
|
+
assert @practitioner, "No Practitioner found for ID #{practitioner_id}"
|
69
|
+
|
70
|
+
assert @practitioner.role.select { |pr|
|
71
|
+
!pr.location.empty?
|
72
|
+
}.size >= 1, "None of the Roles associated with Practitioner #{@practitioner.identifier.first.value}'s contain Location information"
|
73
|
+
|
74
|
+
# Test for address presence
|
75
|
+
assert @practitioner.role.select { |pr|
|
76
|
+
pr.location.select { |locref|
|
77
|
+
# Try and find the Location in contained/Server resources
|
78
|
+
loc = resolve_reference(@practitioner, FHIR::Location, locref.reference)
|
79
|
+
loc && !loc.address.nil?
|
80
|
+
}.size >= 1
|
81
|
+
}.size >= 1, "None of the Locations associated with Practitioner #{@practitioner.identifier.first.value}'s Roles contain Address information"
|
82
|
+
|
83
|
+
# Test for telecom presence
|
84
|
+
assert @practitioner.role.select { |pr|
|
85
|
+
pr.location.select { |locref|
|
86
|
+
# Try and find the Location in contained/Server resources
|
87
|
+
loc = resolve_reference(@practitioner, FHIR::Location, locref.reference)
|
88
|
+
# See if any of the location resources have telecom elements on them
|
89
|
+
loc && !loc.telecom.nil? && !loc.telecom.empty?
|
90
|
+
}.size >= 1
|
91
|
+
}.size >= 1 || @practitioner.role.select { |pr| !pr.telecom.empty? }.size >= 1, "None of the roles associated with Practitioner #{@practitioner.identifier.first.value} contain Telecom information"
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
test 'APCT03', 'Test ability to locate a Provider\'s Direct Address' do
|
96
|
+
metadata {
|
97
|
+
links "#{REST_SPEC_LINK}#read"
|
98
|
+
requires resource: 'Practitioner', methods: ['read', 'search']
|
99
|
+
requires resource: 'PractitionerRole', methods: ['read']
|
100
|
+
requires resource: 'Location', methods: ['read']
|
101
|
+
validates resource: 'Practitioner', methods: ['read', 'search']
|
102
|
+
validates resource: 'PractitionerRole', methods: ['read']
|
103
|
+
validates resource: 'Location', methods: ['read']
|
104
|
+
}
|
105
|
+
skip if !@practitioners || !@practitioner
|
106
|
+
|
107
|
+
assert @practitioner.role.select { |pr| !pr.endpoint.empty? }.size >= 1, "No Endpoints found for Practitioner #{@practitioner.identifier.first.value}"
|
108
|
+
assert @practitioner.role.select { |pr|
|
109
|
+
pr.endpoint.select { |endref|
|
110
|
+
endpoint = resolve_reference(@practitioner, FHIR::Endpoint, endref.reference)
|
111
|
+
endpoint && !endpoint.address.nil? && !endpoint.address.empty?
|
112
|
+
}.size >= 1
|
113
|
+
}.size >= 1, "No Endpoints found with direct address found for Practitioner #{@practitioner.identifier.first.value}"
|
114
|
+
end
|
115
|
+
|
116
|
+
test 'APCT04', 'Test ability to locate an Organization\'s Endpoint' do
|
117
|
+
metadata {
|
118
|
+
links "#{REST_SPEC_LINK}#read"
|
119
|
+
requires resource: 'Organization', methods: ['read', 'search']
|
120
|
+
requires resource: 'Endpoint', methods: ['read']
|
121
|
+
validates resource: 'Organization', methods: ['read', 'search']
|
122
|
+
validates resource: 'Endpoint', methods: ['read']
|
123
|
+
}
|
124
|
+
|
125
|
+
options = {
|
126
|
+
:search => {
|
127
|
+
# :flag => true,
|
128
|
+
:compartment => nil,
|
129
|
+
:parameters => {
|
130
|
+
_count: 100
|
131
|
+
}
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
result = @client.search(FHIR::Organization, options)
|
136
|
+
|
137
|
+
assert_response_ok(result)
|
138
|
+
|
139
|
+
orgs = result.resource.try(:entry)
|
140
|
+
|
141
|
+
assert orgs, 'No Organizations found'
|
142
|
+
|
143
|
+
assert orgs.select{ |org| !org.resource.endpoint.empty? }.size >= 1, "No Organization found with an Endpoint"
|
144
|
+
end
|
145
|
+
|
146
|
+
test 'APCT05', 'Test ability to locate a Location\'s Telecom/physical address' do
|
147
|
+
metadata {
|
148
|
+
requires resource: 'Location', methods: ['read']
|
149
|
+
validates resource: 'Location', methods: ['read']
|
150
|
+
requires resource: 'Address', methods: ['read']
|
151
|
+
validates resource: 'Address', methods: ['read']
|
152
|
+
requires resource: 'ContactPoint', methods: ['read']
|
153
|
+
validates resource: 'ContactPoint', methods: ['read']
|
154
|
+
}
|
155
|
+
|
156
|
+
options = {
|
157
|
+
:search => {
|
158
|
+
# :flag => true,
|
159
|
+
:compartment => nil,
|
160
|
+
:parameters => {
|
161
|
+
_count: 100
|
162
|
+
}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
result = @client.search(FHIR::Location, options)
|
167
|
+
|
168
|
+
assert_response_ok(result)
|
169
|
+
|
170
|
+
locs = result.resource.try(:entry)
|
171
|
+
|
172
|
+
assert locs, "No Locations found"
|
173
|
+
|
174
|
+
assert locs.select { |loc| !loc.resource.address.nil? }.size >= 1, "No Locations found with non-empty Address"
|
175
|
+
|
176
|
+
assert locs.select { |loc| !loc.resource.telecom.nil? && !loc.resource.telecom.empty? }.size >= 1, "No Locations found with non-empty Telecom"
|
177
|
+
|
178
|
+
end
|
179
|
+
|
180
|
+
test 'APCT06', 'Test ability to locate a Location\'s Endpoint' do
|
181
|
+
metadata {
|
182
|
+
requires resource: 'Location', methods: ['read']
|
183
|
+
validates resource: 'Location', methods: ['read']
|
184
|
+
requires resource: 'Endpoint', methods: ['read']
|
185
|
+
validates resource: 'Endpoint', methods: ['read']
|
186
|
+
}
|
187
|
+
|
188
|
+
options = {
|
189
|
+
:search => {
|
190
|
+
# :flag => true,
|
191
|
+
:compartment => nil,
|
192
|
+
:parameters => {
|
193
|
+
_count: 100
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
result = @client.search(FHIR::Location, options)
|
199
|
+
|
200
|
+
assert_response_ok(result)
|
201
|
+
|
202
|
+
locs = result.resource.try(:entry)
|
203
|
+
|
204
|
+
assert locs, "No Locations found"
|
205
|
+
|
206
|
+
assert locs.select { |loc| !loc.resource.endpoint.nil? && !loc.resource.endpoint.empty? }.size >= 1, "No Locations found with non-empty Endpoint"
|
207
|
+
end
|
208
|
+
|
209
|
+
private
|
210
|
+
|
211
|
+
def resolve_reference(resource, reftype, id)
|
212
|
+
return id if id.class == reftype || id.nil?
|
213
|
+
loc = resource.contained.find { |con| con.id == id.gsub('#', '') }
|
214
|
+
#if that doesn't work, try to read it from the server
|
215
|
+
if loc.nil? || loc.try(:empty?)
|
216
|
+
if id.split("/").count > 1
|
217
|
+
res = @client.read(reftype, id.split("/")[1])
|
218
|
+
|
219
|
+
assert_response_ok(res)
|
220
|
+
loc = res.resource
|
221
|
+
else
|
222
|
+
res = @client.read(reftype, id)
|
223
|
+
assert_response_ok(res)
|
224
|
+
|
225
|
+
loc = res.resource
|
226
|
+
end
|
227
|
+
end
|
228
|
+
assert !loc.nil?, "Could not find #{reftype.to_s.split("::")[1]} resource #{id}"
|
229
|
+
|
230
|
+
loc
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
@@ -2,6 +2,8 @@ module Crucible
|
|
2
2
|
module Tests
|
3
3
|
class BaseSuite < BaseTest
|
4
4
|
|
5
|
+
EXCLUDED_RESOURCES = ['DomainResource', 'Resource', 'Parameters', 'OperationOutcome']
|
6
|
+
|
5
7
|
def title
|
6
8
|
self.class.name.demodulize
|
7
9
|
end
|
@@ -10,7 +12,7 @@ module Crucible
|
|
10
12
|
# body should be a String
|
11
13
|
outcome = nil
|
12
14
|
begin
|
13
|
-
outcome = FHIR
|
15
|
+
outcome = FHIR.from_contents(body)
|
14
16
|
outcome = nil if outcome.class!=FHIR::OperationOutcome
|
15
17
|
rescue
|
16
18
|
outcome = nil
|
@@ -26,8 +28,8 @@ module Crucible
|
|
26
28
|
messages
|
27
29
|
end
|
28
30
|
|
29
|
-
def fhir_resources
|
30
|
-
|
31
|
+
def self.fhir_resources
|
32
|
+
FHIR::RESOURCES.select {|r| !EXCLUDED_RESOURCES.include?(r)}.map {|r| "FHIR::#{r}".constantize}
|
31
33
|
end
|
32
34
|
|
33
35
|
def requires(hash)
|
@@ -79,6 +81,8 @@ module Crucible
|
|
79
81
|
result.update(STATUS[:fail], e.message, e.data)
|
80
82
|
rescue SkipException => e
|
81
83
|
result.update(STATUS[:skip], "Skipped: #{test_method}", '')
|
84
|
+
rescue ClientException => e
|
85
|
+
result.update(STATUS[:fail], e.message, '')
|
82
86
|
rescue => e
|
83
87
|
result.update(STATUS[:error], "Fatal Error: #{e.message}", e.backtrace.join("\n"))
|
84
88
|
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
module Crucible
|
2
|
+
module Tests
|
3
|
+
class ConnectathonAttachmentTrackTest < BaseSuite
|
4
|
+
require "base64"
|
5
|
+
|
6
|
+
attr_accessor :attachments
|
7
|
+
|
8
|
+
def id
|
9
|
+
'ConnectathonAttachmentTrackTest'
|
10
|
+
end
|
11
|
+
|
12
|
+
def description
|
13
|
+
'Test support for using FHIR-based messaging for exchanging attachments, particularly for claims processing/payer provider interactions.'
|
14
|
+
end
|
15
|
+
|
16
|
+
def initialize(client1, client2=nil)
|
17
|
+
super(client1, client2)
|
18
|
+
@tags.append('connectathon')
|
19
|
+
@category = {id: 'connectathon', title: 'Connectathon'}
|
20
|
+
end
|
21
|
+
|
22
|
+
def setup
|
23
|
+
@attachments = {}
|
24
|
+
@mime_types = {}
|
25
|
+
@records = {}
|
26
|
+
@attachments["pdf"] = 'ccda_pdf.pdf'
|
27
|
+
@attachments["structured"] = 'ccda_structured.xml'
|
28
|
+
@attachments["unstructured"] = 'ccda_unstructured.xml'
|
29
|
+
|
30
|
+
@mime_types["pdf"] = "application/pdf"
|
31
|
+
@mime_types["structured"] = "application/xml"
|
32
|
+
@mime_types["unstructured"] = "application/xml"
|
33
|
+
|
34
|
+
@resources = Crucible::Generator::Resources.new
|
35
|
+
|
36
|
+
patient = @resources.load_fixture("patient/patient-register-create.xml")
|
37
|
+
practitioner = @resources.load_fixture("practitioner/practitioner-register-create.xml")
|
38
|
+
|
39
|
+
|
40
|
+
create_object(patient, :patient)
|
41
|
+
create_object(practitioner, :practitioner)
|
42
|
+
end
|
43
|
+
|
44
|
+
def teardown
|
45
|
+
@records.each_value do |value|
|
46
|
+
@client.destroy(value.class, value.id)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
%w(pdf structured unstructured).each do |att_type|
|
51
|
+
test "A13_#{att_type}1", "Submit unsolicited attachment of #{att_type}" do
|
52
|
+
comm = FHIR::Communication.new()
|
53
|
+
comm.subject = [@records[:patient].to_reference]
|
54
|
+
comm.recipient = [@records[:practitioner].to_reference]
|
55
|
+
|
56
|
+
comm_att = FHIR::Attachment.new()
|
57
|
+
comm_att.contentType = @mime_types[att_type]
|
58
|
+
comm_att.data = base64_encoded(att_type)
|
59
|
+
comm_att.title = @attachments[att_type]
|
60
|
+
|
61
|
+
payload = FHIR::Communication::Payload.new
|
62
|
+
payload.contentAttachment = [comm_att]
|
63
|
+
|
64
|
+
comm.payload = payload
|
65
|
+
create_object(comm, "comm_#{att_type}")
|
66
|
+
end
|
67
|
+
|
68
|
+
test "A13_#{att_type}2", "Submit solicited attachment of #{att_type}" do
|
69
|
+
# find a suitable CommunicationRequest to respond to
|
70
|
+
options = {
|
71
|
+
:search => {
|
72
|
+
:flag => true,
|
73
|
+
:compartment => nil,
|
74
|
+
:parameters => {
|
75
|
+
_count: 10
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
reply = @client.search(FHIR::CommunicationRequest, options)
|
80
|
+
assert_response_ok(reply)
|
81
|
+
assert_bundle_response(reply)
|
82
|
+
comm_req = reply.resource.entry.sample.try(:resource)
|
83
|
+
|
84
|
+
assert comm_req, 'No CommunicationRequest returned from server'
|
85
|
+
|
86
|
+
comm = FHIR::Communication.new()
|
87
|
+
comm.subject = [comm_req.subject]
|
88
|
+
comm.recipient = [comm_req.sender]
|
89
|
+
comm.basedOn = [comm_req.to_reference]
|
90
|
+
|
91
|
+
comm_att = FHIR::Attachment.new()
|
92
|
+
comm_att.contentType = @mime_types[att_type]
|
93
|
+
comm_att.data = base64_encoded(att_type)
|
94
|
+
comm_att.title = @attachments[att_type]
|
95
|
+
|
96
|
+
payload = FHIR::Communication::Payload.new
|
97
|
+
payload.contentAttachment = [comm_att]
|
98
|
+
|
99
|
+
comm.payload = payload
|
100
|
+
create_object(comm, "comm_#{att_type}")
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
private
|
105
|
+
|
106
|
+
def base64_encoded(type)
|
107
|
+
Base64.encode64(File.read(File.join(Crucible::Generator::Resources::FIXTURE_DIR, "attachment", "#{@attachments[type]}")))
|
108
|
+
end
|
109
|
+
|
110
|
+
def create_object(obj, obj_sym)
|
111
|
+
reply = @client.create obj
|
112
|
+
assert_response_ok(reply)
|
113
|
+
obj.id = reply.id
|
114
|
+
@records[obj_sym] = obj
|
115
|
+
|
116
|
+
warning { assert_valid_resource_content_type_present(reply) }
|
117
|
+
warning { assert_valid_content_location_present(reply) }
|
118
|
+
|
119
|
+
warning { assert @records[obj_sym].equals? reply.resource }
|
120
|
+
end
|
121
|
+
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -20,13 +20,13 @@ module Crucible
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def teardown
|
23
|
-
@client.destroy(FHIR::Provenance, @provenance1.
|
24
|
-
@client.destroy(FHIR::Provenance, @provenance2.
|
25
|
-
@client.destroy(FHIR::Provenance, @provenance3.
|
26
|
-
@client.destroy(FHIR::Provenance, @provenance4.
|
27
|
-
@client.destroy(FHIR::Patient, @patient.
|
28
|
-
@client.destroy(FHIR::Patient, @patient1.
|
29
|
-
@client.destroy(FHIR::Patient, @patient2.
|
23
|
+
@client.destroy(FHIR::Provenance, @provenance1.id) if @provenance1 && !@provenance1.id.nil?
|
24
|
+
@client.destroy(FHIR::Provenance, @provenance2.id) if @provenance2 && !@provenance2.id.nil?
|
25
|
+
@client.destroy(FHIR::Provenance, @provenance3.id) if @provenance3 && !@provenance3.id.nil?
|
26
|
+
@client.destroy(FHIR::Provenance, @provenance4.id) if @provenance4 && !@provenance4.id.nil?
|
27
|
+
@client.destroy(FHIR::Patient, @patient.id) if @patient && !@patient.id.nil?
|
28
|
+
@client.destroy(FHIR::Patient, @patient1.id) if @patient1 && !@patient1.id.nil?
|
29
|
+
@client.destroy(FHIR::Patient, @patient2.id) if @patient2 && !@patient2.id.nil?
|
30
30
|
FHIR::ResourceAddress::DEFAULTS.delete('X-Provenance') # just in case
|
31
31
|
end
|
32
32
|
|
@@ -42,29 +42,31 @@ module Crucible
|
|
42
42
|
requires resource: 'AuditEvent', methods: ['search']
|
43
43
|
validates resource: 'Patient', methods: ['create']
|
44
44
|
validates resource: 'AuditEvent', methods: ['search']
|
45
|
-
validates resource: nil, methods: ['Audit Logging'
|
45
|
+
validates resource: nil, methods: ['Audit Logging']
|
46
46
|
}
|
47
47
|
@patient = @resources.minimal_patient
|
48
|
-
@patient.
|
48
|
+
@patient.id = nil # clear the identifier
|
49
49
|
reply = @client.create(@patient)
|
50
50
|
assert_response_ok(reply)
|
51
|
-
@patient.
|
51
|
+
@patient.id = reply.id
|
52
52
|
|
53
53
|
options = {
|
54
54
|
:search => {
|
55
55
|
:flag => false,
|
56
56
|
:compartment => nil,
|
57
57
|
:parameters => {
|
58
|
-
'
|
58
|
+
'entity' => "Patient/#{@patient.id}"
|
59
59
|
}
|
60
60
|
}
|
61
61
|
}
|
62
|
+
sleep 5 # give a few seconds for the Audit Event to be generated
|
62
63
|
reply = @client.search(FHIR::AuditEvent, options)
|
63
64
|
assert_response_ok(reply)
|
64
65
|
assert_bundle_response(reply)
|
65
66
|
assert_equal(1, reply.resource.entry.size, 'There should only be one AuditEvent for the test Patient currently in the system.', reply.body)
|
66
|
-
assert(reply.resource.entry[0].try(:resource).try(:
|
67
|
-
warning { assert_equal('
|
67
|
+
assert(reply.resource.entry[0].try(:resource).try(:entity).try(:first).try(:reference).try(:reference).include?(@patient.id), 'The correct AuditEvent was not returned.', reply.body)
|
68
|
+
warning { assert_equal('rest', reply.resource.entry[0].try(:resource).try(:type).try(:code), 'Was expecting an AuditEvent.event.type.code of rest', reply.body) }
|
69
|
+
warning { assert_equal('http://hl7.org/fhir/audit-event-type', reply.resource.entry[0].try(:resource).try(:type).try(:system), 'Was expecting an AuditEvent.event.type.system of http://hl7.org/fhir/audit-event-type', reply.body) }
|
68
70
|
end
|
69
71
|
|
70
72
|
# Create a Patient with Provenance as a transaction
|
@@ -84,14 +86,21 @@ module Crucible
|
|
84
86
|
}
|
85
87
|
|
86
88
|
@patient1 = @resources.minimal_patient
|
87
|
-
@patient1.
|
89
|
+
@patient1.id = 'foo'
|
88
90
|
|
89
91
|
@provenance1 = FHIR::Provenance.new
|
90
92
|
@provenance1.target = [ FHIR::Reference.new ]
|
91
|
-
@provenance1.target[0].reference = "Patient/#{@patient1.
|
92
|
-
@provenance1.recorded = DateTime.now.strftime("%Y-%m-%dT%T.%LZ
|
93
|
-
@provenance1.reason = [ FHIR::
|
94
|
-
@provenance1.reason[0].
|
93
|
+
@provenance1.target[0].reference = "Patient/#{@patient1.id}"
|
94
|
+
@provenance1.recorded = DateTime.now.strftime("%Y-%m-%dT%T.%LZ")
|
95
|
+
@provenance1.reason = [ FHIR::Coding.new ]
|
96
|
+
@provenance1.reason[0].system = 'http://hl7.org/fhir/v3/ActReason'
|
97
|
+
@provenance1.reason[0].display = 'patient administration'
|
98
|
+
@provenance1.reason[0].code = 'PATADMIN'
|
99
|
+
@provenance1.agent = [ FHIR::Provenance::Agent.new ]
|
100
|
+
@provenance1.agent[0].role = FHIR::Coding.new
|
101
|
+
@provenance1.agent[0].role.system = 'http://hl7.org/fhir/provenance-participant-role'
|
102
|
+
@provenance1.agent[0].role.display = 'Author'
|
103
|
+
@provenance1.agent[0].role.code = 'author'
|
95
104
|
|
96
105
|
@client.begin_transaction
|
97
106
|
@client.add_transaction_request('POST',nil,@patient1)
|
@@ -100,21 +109,21 @@ module Crucible
|
|
100
109
|
|
101
110
|
# set the patient id as nil, until we know that the transaction was successful, so teardown doesn't try
|
102
111
|
# to delete something that wasn't created
|
103
|
-
@patient1.
|
112
|
+
@patient1.id = nil
|
104
113
|
|
105
|
-
|
114
|
+
assert([200,201,202].include?(reply.code), 'Expected response code 200, 201, or 202', reply.body)
|
106
115
|
assert_bundle_response(reply)
|
107
116
|
|
108
117
|
# set the patient id back from nil to whatever the server created
|
109
|
-
@patient1.
|
110
|
-
@provenance1.
|
118
|
+
@patient1.id = FHIR::ResourceAddress.pull_out_id('Patient',reply.resource.entry[0].try(:response).try(:location))
|
119
|
+
@provenance1.id = FHIR::ResourceAddress.pull_out_id('Provenance',reply.resource.entry[1].try(:response).try(:location))
|
111
120
|
|
112
121
|
options = {
|
113
122
|
:search => {
|
114
123
|
:flag => false,
|
115
124
|
:compartment => nil,
|
116
125
|
:parameters => {
|
117
|
-
'target' => "Patient/#{@patient1.
|
126
|
+
'target' => "Patient/#{@patient1.id}"
|
118
127
|
}
|
119
128
|
}
|
120
129
|
}
|
@@ -122,7 +131,7 @@ module Crucible
|
|
122
131
|
assert_response_ok(reply)
|
123
132
|
assert_bundle_response(reply)
|
124
133
|
assert_equal(1, reply.resource.entry.size, 'There should only be one Provenance for the test Patient currently in the system.', reply.body)
|
125
|
-
assert(reply.resource.entry[0].try(:resource).try(:target).try(:first).try(:reference).include?(@patient1.
|
134
|
+
assert(reply.resource.entry[0].try(:resource).try(:target).try(:first).try(:reference).include?(@patient1.id), 'The correct Provenance was not returned.', reply.body)
|
126
135
|
end
|
127
136
|
|
128
137
|
# Create a Patient with a Provenance header:
|
@@ -138,31 +147,38 @@ module Crucible
|
|
138
147
|
requires resource: 'Provenance', methods: ['search']
|
139
148
|
validates resource: 'Patient', methods: ['create']
|
140
149
|
validates resource: 'Provenance', methods: ['search']
|
150
|
+
validates resource: nil, methods: ['provenance']
|
141
151
|
}
|
142
152
|
|
143
153
|
@patient2 = @resources.minimal_patient
|
144
|
-
@patient2.
|
154
|
+
@patient2.id = nil # clear the identifier
|
145
155
|
|
146
156
|
@provenance2 = FHIR::Provenance.new
|
147
157
|
@provenance2.target = [ FHIR::Reference.new ]
|
148
|
-
# @provenance2.target[0].reference = "Patient/#{@patient2.
|
149
|
-
@provenance2.recorded = DateTime.now.strftime("%Y-%m-%dT%T.%LZ
|
150
|
-
@provenance2.reason = [ FHIR::
|
151
|
-
@provenance2.reason[0].
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
FHIR::
|
158
|
+
# @provenance2.target[0].reference = "Patient/#{@patient2.id}"
|
159
|
+
@provenance2.recorded = DateTime.now.strftime("%Y-%m-%dT%T.%LZ")
|
160
|
+
@provenance2.reason = [ FHIR::Coding.new ]
|
161
|
+
@provenance2.reason[0].system = 'http://hl7.org/fhir/v3/ActReason'
|
162
|
+
@provenance2.reason[0].display = 'patient administration'
|
163
|
+
@provenance2.reason[0].code = 'PATADMIN'
|
164
|
+
@provenance2.agent = [ FHIR::Provenance::Agent.new ]
|
165
|
+
@provenance2.agent[0].role = FHIR::Coding.new
|
166
|
+
@provenance2.agent[0].role.system = 'http://hl7.org/fhir/provenance-participant-role'
|
167
|
+
@provenance2.agent[0].role.display = 'Author'
|
168
|
+
@provenance2.agent[0].role.code = 'author'
|
169
|
+
|
170
|
+
options = { 'X-Provenance' => @provenance2.to_json }
|
171
|
+
reply = @client.base_create(@patient2, options, @client.default_format)
|
156
172
|
|
157
173
|
assert_response_ok(reply)
|
158
|
-
@patient2.
|
174
|
+
@patient2.id = reply.id
|
159
175
|
|
160
176
|
options = {
|
161
177
|
:search => {
|
162
178
|
:flag => false,
|
163
179
|
:compartment => nil,
|
164
180
|
:parameters => {
|
165
|
-
'target' => "Patient/#{@patient2.
|
181
|
+
'target' => "Patient/#{@patient2.id}"
|
166
182
|
}
|
167
183
|
}
|
168
184
|
}
|
@@ -170,8 +186,8 @@ module Crucible
|
|
170
186
|
assert_response_ok(reply)
|
171
187
|
assert_bundle_response(reply)
|
172
188
|
assert_equal(1, reply.resource.entry.size, 'There should only be one Provenance for the test Patient currently in the system.', reply.body)
|
173
|
-
assert(reply.resource.entry[0].try(:resource).try(:target).try(:first).try(:reference).include?(@patient2.
|
174
|
-
@provenance2.
|
189
|
+
assert(reply.resource.entry[0].try(:resource).try(:target).try(:first).try(:reference).include?(@patient2.id), 'The correct Provenance was not returned.', reply.body)
|
190
|
+
@provenance2.id = FHIR::ResourceAddress.pull_out_id('Provenance',reply.resource.entry[0].try(:response).try(:location))
|
175
191
|
end
|
176
192
|
|
177
193
|
# Update a Patient and check for AuditEvent
|
@@ -186,9 +202,10 @@ module Crucible
|
|
186
202
|
requires resource: 'AuditEvent', methods: ['search']
|
187
203
|
validates resource: 'Patient', methods: ['update']
|
188
204
|
validates resource: 'AuditEvent', methods: ['search']
|
205
|
+
validates resource: nil, methods: ['Audit Logging']
|
189
206
|
}
|
190
207
|
@patient.gender = 'male'
|
191
|
-
reply = @client.update(@patient,@patient.
|
208
|
+
reply = @client.update(@patient,@patient.id)
|
192
209
|
assert_response_ok(reply)
|
193
210
|
|
194
211
|
options = {
|
@@ -196,18 +213,25 @@ module Crucible
|
|
196
213
|
:flag => false,
|
197
214
|
:compartment => nil,
|
198
215
|
:parameters => {
|
199
|
-
'
|
216
|
+
'entity' => "Patient/#{@patient.id}"
|
200
217
|
}
|
201
218
|
}
|
202
219
|
}
|
220
|
+
sleep 5 # give a few seconds for the Audit Event to be generated
|
203
221
|
reply = @client.search(FHIR::AuditEvent, options)
|
204
222
|
assert_response_ok(reply)
|
205
223
|
assert_bundle_response(reply)
|
206
|
-
|
224
|
+
found_update_type = false
|
207
225
|
reply.resource.entry.each do |entry|
|
208
|
-
assert(entry.try(:resource).try(:
|
209
|
-
|
226
|
+
assert(entry.try(:resource).try(:entity).try(:first).try(:reference).try(:reference), 'An incorrect AuditEvent was returned.', reply.body)
|
227
|
+
assert(entry.try(:resource).try(:entity).try(:first).try(:reference).try(:reference).include?(@patient.id), 'An incorrect AuditEvent was returned.', reply.body)
|
228
|
+
if entry.try(:resource).try(:action) == 'U'
|
229
|
+
found_update_type = true
|
230
|
+
warning { assert_equal('rest', entry.try(:resource).try(:type).try(:code), 'Was expecting an AuditEvent.event.type.code of rest', reply.body) }
|
231
|
+
warning { assert_equal('http://hl7.org/fhir/audit-event-type', entry.try(:resource).try(:type).try(:system), 'Was expecting an AuditEvent.event.type.system of http://hl7.org/fhir/audit-event-type', reply.body) }
|
232
|
+
end
|
210
233
|
end
|
234
|
+
assert(found_update_type, 'No update AuditEvent returned', reply.body)
|
211
235
|
end
|
212
236
|
|
213
237
|
# Update a Patient with Provenance as a transaction
|
@@ -229,27 +253,34 @@ module Crucible
|
|
229
253
|
|
230
254
|
@provenance3 = FHIR::Provenance.new
|
231
255
|
@provenance3.target = [ FHIR::Reference.new ]
|
232
|
-
@provenance3.target[0].reference = "Patient/#{@patient1.
|
233
|
-
@provenance3.recorded = DateTime.now.strftime("%Y-%m-%dT%T.%LZ
|
234
|
-
@provenance3.reason = [ FHIR::
|
235
|
-
@provenance3.reason[0].
|
256
|
+
@provenance3.target[0].reference = "Patient/#{@patient1.id}"
|
257
|
+
@provenance3.recorded = DateTime.now.strftime("%Y-%m-%dT%T.%LZ")
|
258
|
+
@provenance3.reason = [ FHIR::Coding.new ]
|
259
|
+
@provenance3.reason[0].system = 'http://hl7.org/fhir/v3/ActReason'
|
260
|
+
@provenance3.reason[0].display = 'patient administration'
|
261
|
+
@provenance3.reason[0].code = 'PATADMIN'
|
262
|
+
@provenance3.agent = [ FHIR::Provenance::Agent.new ]
|
263
|
+
@provenance3.agent[0].role = FHIR::Coding.new
|
264
|
+
@provenance3.agent[0].role.system = 'http://hl7.org/fhir/provenance-participant-role'
|
265
|
+
@provenance3.agent[0].role.display = 'Author'
|
266
|
+
@provenance3.agent[0].role.code = 'author'
|
236
267
|
|
237
268
|
@client.begin_transaction
|
238
269
|
@client.add_transaction_request('PUT',nil,@patient1)
|
239
270
|
@client.add_transaction_request('POST',nil,@provenance3)
|
240
271
|
reply = @client.end_transaction
|
241
272
|
|
242
|
-
|
273
|
+
assert([200,201,202].include?(reply.code), 'Expected response code 200, 201, or 202', reply.body)
|
243
274
|
assert_bundle_response(reply)
|
244
275
|
|
245
|
-
@provenance3.
|
276
|
+
@provenance3.id = FHIR::ResourceAddress.pull_out_id('Provenance',reply.resource.entry[1].try(:response).try(:location))
|
246
277
|
|
247
278
|
options = {
|
248
279
|
:search => {
|
249
280
|
:flag => false,
|
250
281
|
:compartment => nil,
|
251
282
|
:parameters => {
|
252
|
-
'target' => "Patient/#{@patient1.
|
283
|
+
'target' => "Patient/#{@patient1.id}"
|
253
284
|
}
|
254
285
|
}
|
255
286
|
}
|
@@ -258,7 +289,7 @@ module Crucible
|
|
258
289
|
assert_bundle_response(reply)
|
259
290
|
assert_equal(2, reply.resource.entry.size, 'There should be two Provenance resources for the test Patient currently in the system.', reply.body)
|
260
291
|
reply.resource.entry.each do |entry|
|
261
|
-
assert(entry.try(:resource).try(:target).try(:first).try(:reference).include?(@patient1.
|
292
|
+
assert(entry.try(:resource).try(:target).try(:first).try(:reference).include?(@patient1.id), 'An incorrect Provenance was returned.', reply.body)
|
262
293
|
end
|
263
294
|
end
|
264
295
|
|
@@ -275,21 +306,26 @@ module Crucible
|
|
275
306
|
requires resource: 'Provenance', methods: ['search']
|
276
307
|
validates resource: 'Patient', methods: ['create']
|
277
308
|
validates resource: 'Provenance', methods: ['search']
|
278
|
-
validates resource: nil, methods: ['provenance']
|
279
309
|
}
|
280
310
|
|
281
311
|
@patient2.gender = 'male'
|
282
312
|
|
283
313
|
@provenance4 = FHIR::Provenance.new
|
284
314
|
@provenance4.target = [ FHIR::Reference.new ]
|
285
|
-
@provenance4.target[0].reference = "Patient/#{@patient2.
|
286
|
-
@provenance4.recorded = DateTime.now.strftime("%Y-%m-%dT%T.%LZ
|
287
|
-
@provenance4.reason = [ FHIR::
|
288
|
-
@provenance4.reason[0].
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
FHIR::
|
315
|
+
# @provenance4.target[0].reference = "Patient/#{@patient2.id}"
|
316
|
+
@provenance4.recorded = DateTime.now.strftime("%Y-%m-%dT%T.%LZ")
|
317
|
+
@provenance4.reason = [ FHIR::Coding.new ]
|
318
|
+
@provenance4.reason[0].system = 'http://hl7.org/fhir/v3/ActReason'
|
319
|
+
@provenance4.reason[0].display = 'patient administration'
|
320
|
+
@provenance4.reason[0].code = 'PATADMIN'
|
321
|
+
@provenance4.agent = [ FHIR::Provenance::Agent.new ]
|
322
|
+
@provenance4.agent[0].role = FHIR::Coding.new
|
323
|
+
@provenance4.agent[0].role.system = 'http://hl7.org/fhir/provenance-participant-role'
|
324
|
+
@provenance4.agent[0].role.display = 'Author'
|
325
|
+
@provenance4.agent[0].role.code = 'author'
|
326
|
+
|
327
|
+
options = { 'X-Provenance' => @provenance4.to_json }
|
328
|
+
reply = @client.base_update(@patient2, @patient2.id, options, @client.default_format)
|
293
329
|
assert_response_ok(reply)
|
294
330
|
|
295
331
|
|
@@ -298,7 +334,7 @@ module Crucible
|
|
298
334
|
:flag => false,
|
299
335
|
:compartment => nil,
|
300
336
|
:parameters => {
|
301
|
-
'target' => "Patient/#{@patient2.
|
337
|
+
'target' => "Patient/#{@patient2.id}"
|
302
338
|
}
|
303
339
|
}
|
304
340
|
}
|
@@ -307,10 +343,11 @@ module Crucible
|
|
307
343
|
assert_bundle_response(reply)
|
308
344
|
assert_equal(2, reply.resource.entry.size, 'There should be two Provenance resources for the test Patient currently in the system.', reply.body)
|
309
345
|
reply.resource.entry.each do |entry|
|
310
|
-
assert(entry.try(:resource).try(:target).try(:first).try(:reference)
|
346
|
+
assert(entry.try(:resource).try(:target).try(:first).try(:reference), 'An incorrect Provenance was returned.', reply.body)
|
347
|
+
assert(entry.try(:resource).try(:target).try(:first).try(:reference).include?(@patient2.id), 'An incorrect Provenance was returned.', reply.body)
|
311
348
|
end
|
312
|
-
@provenance3.
|
313
|
-
@provenance4.
|
349
|
+
@provenance3.id = FHIR::ResourceAddress.pull_out_id('Provenance',reply.resource.entry[0].try(:response).try(:location))
|
350
|
+
@provenance4.id = FHIR::ResourceAddress.pull_out_id('Provenance',reply.resource.entry[1].try(:response).try(:location))
|
314
351
|
end
|
315
352
|
|
316
353
|
# Read a Patient and check for AuditEvent
|
@@ -325,9 +362,9 @@ module Crucible
|
|
325
362
|
requires resource: 'AuditEvent', methods: ['search']
|
326
363
|
validates resource: 'Patient', methods: ['read']
|
327
364
|
validates resource: 'AuditEvent', methods: ['search']
|
328
|
-
validates resource: nil, methods: ['Audit Logging'
|
365
|
+
validates resource: nil, methods: ['Audit Logging']
|
329
366
|
}
|
330
|
-
reply = @client.read(FHIR::Patient,@patient.
|
367
|
+
reply = @client.read(FHIR::Patient,@patient.id)
|
331
368
|
assert_response_ok(reply)
|
332
369
|
|
333
370
|
options = {
|
@@ -335,18 +372,25 @@ module Crucible
|
|
335
372
|
:flag => false,
|
336
373
|
:compartment => nil,
|
337
374
|
:parameters => {
|
338
|
-
'
|
375
|
+
'entity' => "Patient/#{@patient.id}"
|
339
376
|
}
|
340
377
|
}
|
341
378
|
}
|
379
|
+
sleep 5 # give a few seconds for the Audit Event to be generated
|
342
380
|
reply = @client.search(FHIR::AuditEvent, options)
|
343
381
|
assert_response_ok(reply)
|
344
382
|
assert_bundle_response(reply)
|
345
|
-
|
383
|
+
found_read_type = false
|
346
384
|
reply.resource.entry.each do |entry|
|
347
|
-
assert(entry.try(:resource).try(:
|
348
|
-
|
385
|
+
assert(entry.try(:resource).try(:entity).try(:first).try(:reference).try(:reference), 'An incorrect AuditEvent was returned.', reply.body)
|
386
|
+
assert(entry.try(:resource).try(:entity).try(:first).try(:reference).try(:reference).include?(@patient.id), 'An incorrect AuditEvent was returned.', reply.body)
|
387
|
+
if entry.try(:resource).try(:action) == 'R'
|
388
|
+
found_read_type = true
|
389
|
+
warning { assert_equal('rest', entry.try(:resource).try(:type).try(:code), 'Was expecting an AuditEvent.event.type.code of rest', reply.body) }
|
390
|
+
warning { assert_equal('http://hl7.org/fhir/audit-event-type', entry.try(:resource).try(:type).try(:system), 'Was expecting an AuditEvent.event.type.system of http://hl7.org/fhir/audit-event-type', reply.body) }
|
391
|
+
end
|
349
392
|
end
|
393
|
+
assert(found_read_type, 'No read AuditEvent returned', reply.body)
|
350
394
|
end
|
351
395
|
|
352
396
|
end
|