plan_executor 1.0.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -12,6 +12,7 @@ module Crucible
|
|
|
12
12
|
|
|
13
13
|
def initialize(client1, client2=nil)
|
|
14
14
|
super(client1, client2)
|
|
15
|
+
@tags.append('connectathon')
|
|
15
16
|
@category = {id: 'connectathon', title: 'Connectathon'}
|
|
16
17
|
end
|
|
17
18
|
|
|
@@ -32,13 +33,40 @@ module Crucible
|
|
|
32
33
|
bundle = reply.resource
|
|
33
34
|
@valueset = bundle.entry[0].resource if bundle.entry.size > 0
|
|
34
35
|
end
|
|
36
|
+
|
|
37
|
+
@resources = Crucible::Generator::Resources.new
|
|
38
|
+
|
|
39
|
+
if @valueset.nil?
|
|
40
|
+
# The resource was not found, try to create it in case the server
|
|
41
|
+
# dynamically calculates terminology operations based on local resources
|
|
42
|
+
codesystem_types = @resources.load_fixture('terminology/codesystem-data-types.json')
|
|
43
|
+
codesystem_rsrcs = @resources.load_fixture('terminology/codesystem-resource-types.json')
|
|
44
|
+
valueset_defined = @resources.load_fixture('terminology/valueset-defined-types.json')
|
|
45
|
+
@codesystem_types_id = @client.create(codesystem_types).id
|
|
46
|
+
@codesystem_rsrcs_id = @client.create(codesystem_rsrcs).id
|
|
47
|
+
@valueset_defined_id = @client.create(valueset_defined).id
|
|
48
|
+
@valueset_defined.id = @valueset_defined_id
|
|
49
|
+
@valueset = valueset_defined
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
v2_codesystem = @resources.load_fixture('terminology/v2-codesystem.json')
|
|
53
|
+
v2_valueset = @resources.load_fixture('terminology/v2-valueset.json')
|
|
54
|
+
@v2_codesystem_id = @client.create(v2_codesystem).id
|
|
55
|
+
@v2_valueset_id = @client.create(v2_valueset).id
|
|
35
56
|
end
|
|
36
57
|
|
|
37
58
|
def teardown
|
|
38
|
-
|
|
59
|
+
@client.destroy(FHIR::ValueSet, @valueset_defined_id) if @valueset_defined_id
|
|
60
|
+
@client.destroy(FHIR::CodeSystem, @codesystem_types_id) if @codesystem_types_id
|
|
61
|
+
@client.destroy(FHIR::CodeSystem, @codesystem_rsrcs_id) if @codesystem_rsrcs_id
|
|
62
|
+
@client.destroy(FHIR::ValueSet, @v2_valueset_id) if @v2_valueset_id
|
|
63
|
+
@client.destroy(FHIR::CodeSystem, @v2_codesystem_id) if @v2_codesystem_id
|
|
64
|
+
# CT13 does # DELETE codesystem_simple
|
|
65
|
+
# CT13 does # DELETE valueset_simple
|
|
66
|
+
# CT17 does # DELETE conceptmap_created_id
|
|
39
67
|
end
|
|
40
68
|
|
|
41
|
-
['GET','POST'].each do |how|
|
|
69
|
+
['GET','POST'].each do |how|
|
|
42
70
|
|
|
43
71
|
test "CT01#{how[0]}", "Expand a specific ValueSet (#{how})" do
|
|
44
72
|
metadata {
|
|
@@ -48,7 +76,7 @@ module Crucible
|
|
|
48
76
|
}
|
|
49
77
|
skip if @valueset.nil?
|
|
50
78
|
options = {
|
|
51
|
-
:id => @valueset.
|
|
79
|
+
:id => @valueset.id,
|
|
52
80
|
:operation => {
|
|
53
81
|
:method => how
|
|
54
82
|
}
|
|
@@ -56,7 +84,8 @@ module Crucible
|
|
|
56
84
|
reply = @client.value_set_expansion(options)
|
|
57
85
|
assert_response_ok(reply)
|
|
58
86
|
assert_resource_type(reply, FHIR::ValueSet)
|
|
59
|
-
|
|
87
|
+
reference_set = FHIR::StructureDefinition::METADATA['type']['valid_codes'].values.flatten
|
|
88
|
+
check_expansion_for_concepts(reply.resource, reference_set)
|
|
60
89
|
end
|
|
61
90
|
|
|
62
91
|
test "CT02#{how[0]}", "Expand a ValueSet by context (#{how})" do
|
|
@@ -69,14 +98,15 @@ module Crucible
|
|
|
69
98
|
:operation => {
|
|
70
99
|
:method => how,
|
|
71
100
|
:parameters => {
|
|
72
|
-
'context' => { type: 'Uri', value: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition#StructureDefinition.
|
|
101
|
+
'context' => { type: 'Uri', value: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition#StructureDefinition.type' }
|
|
73
102
|
}
|
|
74
103
|
}
|
|
75
104
|
}
|
|
76
105
|
reply = @client.value_set_expansion(options)
|
|
77
106
|
assert_response_ok(reply)
|
|
78
107
|
assert_resource_type(reply, FHIR::ValueSet)
|
|
79
|
-
|
|
108
|
+
reference_set = FHIR::StructureDefinition::METADATA['type']['valid_codes'].values.flatten
|
|
109
|
+
check_expansion_for_concepts(reply.resource, reference_set)
|
|
80
110
|
end
|
|
81
111
|
|
|
82
112
|
test "CT03#{how[0]}", "Validate a code using identifier (#{how})" do
|
|
@@ -85,12 +115,14 @@ module Crucible
|
|
|
85
115
|
links "#{BASE_SPEC_LINK}/valueset-operations.html#validate-code"
|
|
86
116
|
validates resource: 'ValueSet', methods: ['$validate-code']
|
|
87
117
|
}
|
|
118
|
+
skip if @valueset.nil?
|
|
88
119
|
options = {
|
|
89
120
|
:operation => {
|
|
90
121
|
:method => how,
|
|
91
122
|
:parameters => {
|
|
92
|
-
'
|
|
93
|
-
'
|
|
123
|
+
'identifier' => { type: 'Uri', value: 'http://hl7.org/fhir/ValueSet/data-types' },
|
|
124
|
+
'code' => { type: 'Code', value: 'base64Binary' },
|
|
125
|
+
'system' => { type: 'Uri', value: 'http://hl7.org/fhir/data-types' }
|
|
94
126
|
}
|
|
95
127
|
}
|
|
96
128
|
}
|
|
@@ -111,6 +143,7 @@ module Crucible
|
|
|
111
143
|
:method => how,
|
|
112
144
|
:parameters => {
|
|
113
145
|
'code' => { type: 'Code', value: 'BRN' },
|
|
146
|
+
'system' => { type: 'Uri', value: 'http://hl7.org/fhir/v2/0487' },
|
|
114
147
|
'identifier' => { type: 'Uri', value: 'http://hl7.org/fhir/ValueSet/v2-0487' }
|
|
115
148
|
}
|
|
116
149
|
}
|
|
@@ -120,28 +153,28 @@ module Crucible
|
|
|
120
153
|
check_response_params(reply.body,'result','valueBoolean','true')
|
|
121
154
|
end
|
|
122
155
|
|
|
123
|
-
#
|
|
124
|
-
test "CT05#{how[0]}", "Lookup a v2 code using identifier (#{how})" do
|
|
156
|
+
test "CT06#{how[0]}", "Validate a code by system (#{how})" do
|
|
125
157
|
metadata {
|
|
126
158
|
links "#{BASE_SPEC_LINK}/operations.html#executing"
|
|
127
159
|
links "#{BASE_SPEC_LINK}/valueset-operations.html#validate-code"
|
|
128
|
-
validates resource: 'ValueSet', methods: ['$
|
|
160
|
+
validates resource: 'ValueSet', methods: ['$validate-code']
|
|
129
161
|
}
|
|
130
162
|
options = {
|
|
131
163
|
:operation => {
|
|
132
164
|
:method => how,
|
|
133
165
|
:parameters => {
|
|
134
|
-
'code' => { type: 'Code', value: '
|
|
135
|
-
'
|
|
166
|
+
'code' => { type: 'Code', value: 'base64Binary' },
|
|
167
|
+
'system' => { type: 'Uri', value: 'http://hl7.org/fhir/data-types' }
|
|
136
168
|
}
|
|
137
169
|
}
|
|
138
170
|
}
|
|
139
|
-
reply = @client.
|
|
171
|
+
reply = @client.value_set_code_validation(options)
|
|
140
172
|
assert_response_ok(reply)
|
|
141
|
-
check_response_params(reply.body,'
|
|
173
|
+
check_response_params(reply.body,'result','valueBoolean','true')
|
|
142
174
|
end
|
|
143
175
|
|
|
144
|
-
|
|
176
|
+
# validate v2 code
|
|
177
|
+
test "CT07#{how[0]}", "Validate a v2 code by system (#{how})" do
|
|
145
178
|
metadata {
|
|
146
179
|
links "#{BASE_SPEC_LINK}/operations.html#executing"
|
|
147
180
|
links "#{BASE_SPEC_LINK}/valueset-operations.html#validate-code"
|
|
@@ -151,8 +184,8 @@ module Crucible
|
|
|
151
184
|
:operation => {
|
|
152
185
|
:method => how,
|
|
153
186
|
:parameters => {
|
|
154
|
-
'code' => { type: 'Code', value: '
|
|
155
|
-
'system' => { type: 'Uri', value: 'http://hl7.org/fhir/
|
|
187
|
+
'code' => { type: 'Code', value: 'BRN' },
|
|
188
|
+
'system' => { type: 'Uri', value: 'http://hl7.org/fhir/v2/0487' }
|
|
156
189
|
}
|
|
157
190
|
}
|
|
158
191
|
}
|
|
@@ -160,20 +193,70 @@ module Crucible
|
|
|
160
193
|
assert_response_ok(reply)
|
|
161
194
|
check_response_params(reply.body,'result','valueBoolean','true')
|
|
162
195
|
end
|
|
196
|
+
end # ['GET','POST'].each
|
|
163
197
|
|
|
164
|
-
|
|
165
|
-
|
|
198
|
+
test "CT09", "Create a ValueSet that points to a local CodeSystem" do
|
|
199
|
+
metadata {
|
|
200
|
+
links "#{REST_SPEC_LINK}#create"
|
|
201
|
+
links "#{BASE_SPEC_LINK}/codesystem.html"
|
|
202
|
+
links "#{BASE_SPEC_LINK}/valueset.html#create"
|
|
203
|
+
validates resource: 'CodeSystem', methods: ['create']
|
|
204
|
+
validates resource: 'ValueSet', methods: ['create']
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@resources = Crucible::Generator::Resources.new
|
|
208
|
+
@codesystem_simple = @resources.codesystem_simple
|
|
209
|
+
@valueset_simple = @resources.valueset_simple
|
|
210
|
+
|
|
211
|
+
# make more unique in case this valueset & codesystem already exists
|
|
212
|
+
@valueset_simple.url = @valueset_simple.url + rand(10000000).to_s
|
|
213
|
+
@codesystem_simple.url = @codesystem_simple.url + rand(10000000).to_s
|
|
214
|
+
@valueset_simple.compose.include.first.system = @codesystem_simple.url
|
|
215
|
+
|
|
216
|
+
reply = @client.create @codesystem_simple
|
|
217
|
+
assert_response_code(reply, 201)
|
|
218
|
+
@codesystem_created_id = reply.id
|
|
219
|
+
reply = @client.create @valueset_simple
|
|
220
|
+
assert_response_code(reply, 201)
|
|
221
|
+
@valueset_created_id = reply.id
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
['GET','POST'].each do |how|
|
|
225
|
+
|
|
226
|
+
test "CT10#{how[0]}", "Expand a ValueSet that points to a local CodeSystem(#{how})" do
|
|
227
|
+
metadata {
|
|
228
|
+
links "#{BASE_SPEC_LINK}/operations.html#executing"
|
|
229
|
+
links "#{BASE_SPEC_LINK}/valueset-operations.html#expand"
|
|
230
|
+
validates resource: 'ValueSet', methods: ['$expand']
|
|
231
|
+
}
|
|
232
|
+
skip if @valueset_created_id.nil? || @codesystem_created_id.nil?
|
|
233
|
+
options = {
|
|
234
|
+
:id => @valueset_created_id,
|
|
235
|
+
:operation => {
|
|
236
|
+
:method => how
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
reply = @client.value_set_expansion(options)
|
|
240
|
+
assert_response_ok(reply)
|
|
241
|
+
assert_resource_type(reply, FHIR::ValueSet)
|
|
242
|
+
reference_set = @codesystem_simple.concept.map(&:code)
|
|
243
|
+
check_expansion_for_concepts(reply.resource, reference_set)
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
test "CT11#{how[0]}", "Validate a code from local CodeSystem using identifier(#{how})" do
|
|
166
247
|
metadata {
|
|
167
248
|
links "#{BASE_SPEC_LINK}/operations.html#executing"
|
|
168
249
|
links "#{BASE_SPEC_LINK}/valueset-operations.html#validate-code"
|
|
169
250
|
validates resource: 'ValueSet', methods: ['$validate-code']
|
|
170
251
|
}
|
|
252
|
+
skip if @valueset_created_id.nil? || @codesystem_created_id.nil?
|
|
171
253
|
options = {
|
|
172
254
|
:operation => {
|
|
173
255
|
:method => how,
|
|
174
256
|
:parameters => {
|
|
175
|
-
'code' => { type: 'Code', value:
|
|
176
|
-
'system' => { type: 'Uri', value:
|
|
257
|
+
'code' => { type: 'Code', value: @codesystem_simple.concept.first.code },
|
|
258
|
+
'system' => { type: 'Uri', value: @codesystem_simple.url },
|
|
259
|
+
'identifier' => { type: 'Uri', value: @valueset_simple.url }
|
|
177
260
|
}
|
|
178
261
|
}
|
|
179
262
|
}
|
|
@@ -182,40 +265,134 @@ module Crucible
|
|
|
182
265
|
check_response_params(reply.body,'result','valueBoolean','true')
|
|
183
266
|
end
|
|
184
267
|
|
|
185
|
-
#
|
|
186
|
-
test "CT08#{how[0]}", "Lookup a v2 code by system (#{how})" do
|
|
268
|
+
test "CT12#{how[0]}", "Lookup code from local CodeSystem using identifier(#{how})" do
|
|
187
269
|
metadata {
|
|
188
270
|
links "#{BASE_SPEC_LINK}/operations.html#executing"
|
|
189
|
-
links "#{BASE_SPEC_LINK}/
|
|
271
|
+
links "#{BASE_SPEC_LINK}/codesystem-operations.html#lookup"
|
|
190
272
|
validates resource: 'ValueSet', methods: ['$lookup']
|
|
191
273
|
}
|
|
274
|
+
skip if @codesystem_created_id.nil?
|
|
192
275
|
options = {
|
|
193
276
|
:operation => {
|
|
194
277
|
:method => how,
|
|
195
278
|
:parameters => {
|
|
196
|
-
'code' => { type: 'Code', value:
|
|
197
|
-
'system' => { type: 'Uri', value:
|
|
279
|
+
'code' => { type: 'Code', value: @codesystem_simple.concept.first.code },
|
|
280
|
+
'system' => { type: 'Uri', value: @codesystem_simple.url }
|
|
198
281
|
}
|
|
199
282
|
}
|
|
200
283
|
}
|
|
201
|
-
reply = @client.
|
|
284
|
+
reply = @client.code_system_lookup(options)
|
|
202
285
|
assert_response_ok(reply)
|
|
203
|
-
check_response_params(reply.body,'display','valueString'
|
|
286
|
+
check_response_params(reply.body,'display','valueString',@codesystem_simple.concept.first.display)
|
|
204
287
|
end
|
|
288
|
+
end
|
|
205
289
|
|
|
206
|
-
|
|
290
|
+
test "CT13", "Delete CodeSystem and ValueSet" do
|
|
291
|
+
metadata {
|
|
292
|
+
links "#{REST_SPEC_LINK}#delete"
|
|
293
|
+
links "#{BASE_SPEC_LINK}/valueset.html"
|
|
294
|
+
links "#{BASE_SPEC_LINK}/codesystem.html"
|
|
295
|
+
validates resource: 'CodeSystem', methods: ['delete']
|
|
296
|
+
validates resource: 'ValueSet', methods: ['delete']
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
skip if @codesystem_created_id.nil?
|
|
300
|
+
reply = @client.destroy FHIR::CodeSystem, @codesystem_created_id
|
|
301
|
+
assert_response_code(reply, 204)
|
|
302
|
+
|
|
303
|
+
skip if @valueset_created_id.nil?
|
|
304
|
+
@client.destroy FHIR::ValueSet, @valueset_created_id
|
|
305
|
+
assert_response_code(reply, 204)
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
test "CT14", "Create ConceptMap" do
|
|
309
|
+
metadata {
|
|
310
|
+
links "#{REST_SPEC_LINK}#create"
|
|
311
|
+
links "#{BASE_SPEC_LINK}/conceptmap.html"
|
|
312
|
+
validates resource: 'ConceptMap', methods: ['create']
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@resources = Crucible::Generator::Resources.new
|
|
316
|
+
@conceptmap_simple = @resources.conceptmap_simple
|
|
317
|
+
@conceptmap_simple.id = nil
|
|
318
|
+
@conceptmap_simple.url = @conceptmap_simple.url + rand(10000000).to_s
|
|
319
|
+
|
|
320
|
+
reply = @client.create @conceptmap_simple
|
|
321
|
+
assert_response_code(reply, 201)
|
|
322
|
+
@conceptmap_created_id = reply.id
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
['GET','POST'].each do |how|
|
|
326
|
+
test "CT15#{how[0]}", "$translate a code using a ConceptMap (#{how})" do
|
|
327
|
+
metadata {
|
|
328
|
+
links "#{BASE_SPEC_LINK}/operations.html#executing"
|
|
329
|
+
links "#{BASE_SPEC_LINK}/conceptmap-operations.html#translate"
|
|
330
|
+
validates resource: 'ConceptMap', methods: ['$translate']
|
|
331
|
+
}
|
|
332
|
+
skip if @conceptmap_created_id.nil?
|
|
333
|
+
assert @conceptmap_simple.group.first.try(:element).try(:first), "ConceptMap #{@conceptmap_simple.id} does not have a code to translate in group"
|
|
334
|
+
options = {
|
|
335
|
+
:operation => {
|
|
336
|
+
:method => how,
|
|
337
|
+
:parameters => {
|
|
338
|
+
'code' => { type: 'Code', value: @conceptmap_simple.group.first.element.first.code },
|
|
339
|
+
'system' => { type: 'Uri', value: @conceptmap_simple.group.first.source },
|
|
340
|
+
'target' => { type: 'Uri', value: @conceptmap_simple.targetReference.reference }
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
reply = @client.concept_map_translate(options)
|
|
345
|
+
assert_response_ok(reply)
|
|
346
|
+
check_response_params(reply.body,'result','valueBoolean','true')
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
test "CT16", "$closure table maintenance" do
|
|
351
|
+
metadata {
|
|
352
|
+
links "#{BASE_SPEC_LINK}/operations.html#executing"
|
|
353
|
+
links "#{BASE_SPEC_LINK}/conceptmap-operations.html#closure"
|
|
354
|
+
validates resource: 'ConceptMap', methods: ['$closure']
|
|
355
|
+
}
|
|
356
|
+
coding = FHIR::Coding.new({'system'=>'http://snomed.info/sct','code'=>'22298006'})
|
|
357
|
+
options = {
|
|
358
|
+
:operation => {
|
|
359
|
+
:method => 'POST',
|
|
360
|
+
:parameters => {
|
|
361
|
+
'name' => { type: 'String', value: 'crucible-test-closure' },
|
|
362
|
+
'concept' => { type: 'Coding', value: coding }
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
reply = @client.closure_table_maintenance(options)
|
|
367
|
+
assert_response_ok(reply)
|
|
368
|
+
assert_resource_type(reply, FHIR::ConceptMap)
|
|
369
|
+
code = reply.resource.element.find{|x|x.code=='22298006'}
|
|
370
|
+
assert code, 'Closure Table Operation should return the code that was supplied in the request.'
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
test "CT17", "Delete ConceptMap" do
|
|
374
|
+
metadata {
|
|
375
|
+
links "#{REST_SPEC_LINK}#delete"
|
|
376
|
+
links "#{BASE_SPEC_LINK}/conceptmap.html"
|
|
377
|
+
validates resource: 'ConceptMap', methods: ['delete']
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
skip if @conceptmap_created_id.nil?
|
|
381
|
+
reply = @client.destroy FHIR::ConceptMap, @conceptmap_created_id
|
|
382
|
+
assert_response_code(reply, 204)
|
|
383
|
+
end
|
|
207
384
|
|
|
208
|
-
def check_expansion_for_concepts(vs)
|
|
385
|
+
def check_expansion_for_concepts(vs, ref)
|
|
209
386
|
assert(vs.expansion,'ValueSet should contain expansion.')
|
|
210
387
|
assert(vs.expansion.contains,'ValueSet.expansion.contains elements are missing.')
|
|
211
388
|
|
|
212
389
|
concepts = vs.expansion.contains.map{|c|c.code}
|
|
213
390
|
|
|
214
|
-
expansion_missing =
|
|
215
|
-
expansion_added = concepts -
|
|
391
|
+
expansion_missing = ref - concepts
|
|
392
|
+
expansion_added = concepts - ref
|
|
216
393
|
|
|
217
394
|
assert(expansion_missing.empty?,"ValueSet expansion is missing the following concepts: #{expansion_missing}")
|
|
218
|
-
assert(expansion_added.empty?,"ValueSet expansion contained some unexpected concepts: #{expansion_added}")
|
|
395
|
+
assert(expansion_added.empty?,"ValueSet expansion contained some unexpected concepts: #{expansion_added}")
|
|
219
396
|
end
|
|
220
397
|
|
|
221
398
|
def check_response_params(contents,name,attribute,value)
|
|
@@ -13,6 +13,7 @@ module Crucible
|
|
|
13
13
|
def initialize(client1, client2=nil)
|
|
14
14
|
super(client1, client2)
|
|
15
15
|
@tags.append('argonaut')
|
|
16
|
+
@tags.append('connectathon')
|
|
16
17
|
@category = {id: 'core_functionality', title: 'Core Functionality'}
|
|
17
18
|
end
|
|
18
19
|
|
|
@@ -27,26 +28,31 @@ module Crucible
|
|
|
27
28
|
# required by DAF. This is a read-only test.
|
|
28
29
|
@daf_patient = Crucible::Tests::DAFResourceGenerator.daf_patient
|
|
29
30
|
reply = @client.create(@daf_patient)
|
|
30
|
-
@daf_patient.
|
|
31
|
+
@daf_patient.id = reply.id if !reply.id.nil?
|
|
31
32
|
# assert_response_created(reply)
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
def teardown
|
|
35
36
|
# delete resources
|
|
36
|
-
@client.destroy(FHIR::Patient, @daf_patient.
|
|
37
|
+
@client.destroy(FHIR::Patient, @daf_patient.id) if @daf_patient && !@daf_patient.id.nil?
|
|
37
38
|
end
|
|
38
39
|
|
|
39
|
-
# Check
|
|
40
|
-
test 'DAF00','Check
|
|
40
|
+
# Check CapabilityStatement for DAF Profiles
|
|
41
|
+
test 'DAF00','Check CapabilityStatement for DAF Profiles' do
|
|
41
42
|
metadata {
|
|
42
43
|
links "#{REST_SPEC_LINK}#conformance"
|
|
43
44
|
links "#{BASE_SPEC_LINK}/conformance.html"
|
|
45
|
+
links "#{REST_SPEC_LINK}#capabilitystatement"
|
|
46
|
+
links "#{BASE_SPEC_LINK}/capabilitystatement.html"
|
|
44
47
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
45
48
|
requires resource: 'Conformance', methods: ['read']
|
|
49
|
+
requires resource: 'CapabilityStatement', methods: ['read']
|
|
46
50
|
validates resource: 'Conformance', methods: ['read']
|
|
51
|
+
validates resource: 'CapabilityStatement', methods: ['read']
|
|
47
52
|
}
|
|
48
53
|
|
|
49
|
-
@conformance = @client.
|
|
54
|
+
@conformance = @client.conformance_statement
|
|
55
|
+
assert(@conformance, 'No capability statement found.')
|
|
50
56
|
|
|
51
57
|
# Collect the list of DAF profiles
|
|
52
58
|
daf_profiles = @daf_conformance.profile.map{|x|x.reference}
|
|
@@ -56,26 +62,31 @@ module Crucible
|
|
|
56
62
|
rest_profiles = @conformance.rest.map{|r|r.resource.map{|r|r.try(:profile).try(:reference)}}.flatten.compact
|
|
57
63
|
|
|
58
64
|
missing_daf_profiles = daf_profiles - root_profiles - rest_profiles
|
|
59
|
-
assert(missing_daf_profiles.compact.empty?, "The
|
|
65
|
+
assert(missing_daf_profiles.compact.empty?, "The CapabilityStatement statement does not declare support for the following DAF profiles: #{missing_daf_profiles}", @conformance.to_xml)
|
|
60
66
|
end
|
|
61
67
|
|
|
62
|
-
# Check
|
|
63
|
-
test 'DAF01','Check
|
|
68
|
+
# Check CapabilityStatement for SMART Security Extensions
|
|
69
|
+
test 'DAF01','Check CapabilityStatement for SMART-on-FHIR Security Extensions' do
|
|
64
70
|
metadata {
|
|
65
71
|
links "#{REST_SPEC_LINK}#conformance"
|
|
66
72
|
links "#{BASE_SPEC_LINK}/conformance.html"
|
|
73
|
+
links "#{REST_SPEC_LINK}#capabilitystatement"
|
|
74
|
+
links "#{BASE_SPEC_LINK}/capabilitystatement.html"
|
|
67
75
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
68
76
|
requires resource: 'Conformance', methods: ['read']
|
|
77
|
+
requires resource: 'CapabilityStatement', methods: ['read']
|
|
69
78
|
validates resource: 'Conformance', methods: ['read']
|
|
79
|
+
validates resource: 'CapabilityStatement', methods: ['read']
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
smart_security_base = 'http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris'
|
|
73
83
|
smart_security_extensions = ['register','authorize','token']
|
|
74
84
|
|
|
75
85
|
@rest_index = nil
|
|
76
|
-
@found_smart_code = false
|
|
86
|
+
@found_smart_code = false
|
|
77
87
|
found_smart_base = false
|
|
78
88
|
|
|
89
|
+
assert(@conformance, 'No capability statement found.')
|
|
79
90
|
@conformance.rest.each_with_index do |rest,index|
|
|
80
91
|
service = rest.try(:security).try(:service)
|
|
81
92
|
if !service.nil? && !service.empty?
|
|
@@ -98,104 +109,119 @@ module Crucible
|
|
|
98
109
|
end
|
|
99
110
|
end # each restful endpoint
|
|
100
111
|
|
|
101
|
-
assert(@found_smart_code,'
|
|
102
|
-
assert((found_smart_base && smart_security_extensions.empty?),"
|
|
112
|
+
assert(@found_smart_code,'CapabilityStatement does not declare the SMART-on-FHIR security service for any REST endpoints.',@conformance.to_xml)
|
|
113
|
+
assert((found_smart_base && smart_security_extensions.empty?),"CapabilityStatement does not declare the SMART-on-FHIR security extensions: #{smart_security_base} #{smart_security_extensions}",@conformance.to_xml)
|
|
103
114
|
end
|
|
104
115
|
|
|
105
|
-
# Check that
|
|
106
|
-
test 'DAF02','Check
|
|
107
|
-
|
|
116
|
+
# Check that CapabilityStatement Resource Interactions
|
|
117
|
+
test 'DAF02','Check CapabilityStatement Resource Interactions against DAF CapabilityStatement' do
|
|
118
|
+
metadata {
|
|
108
119
|
links "#{REST_SPEC_LINK}#conformance"
|
|
109
120
|
links "#{BASE_SPEC_LINK}/conformance.html"
|
|
121
|
+
links "#{REST_SPEC_LINK}#capabilitystatement"
|
|
122
|
+
links "#{BASE_SPEC_LINK}/capabilitystatement.html"
|
|
110
123
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
111
124
|
requires resource: 'Conformance', methods: ['read']
|
|
125
|
+
requires resource: 'CapabilityStatement', methods: ['read']
|
|
112
126
|
validates resource: 'Conformance', methods: ['read']
|
|
127
|
+
validates resource: 'CapabilityStatement', methods: ['read']
|
|
113
128
|
}
|
|
114
129
|
|
|
130
|
+
assert(@conformance, 'No capability statement found.')
|
|
115
131
|
rest = @conformance.rest.first
|
|
116
132
|
rest = @conformance.rest[@rest_index] if @found_smart_code
|
|
117
133
|
|
|
118
134
|
@daf_conformance.rest.first.resource.each do |daf_resource|
|
|
119
|
-
resource = rest.resource.select{|r|r.
|
|
120
|
-
assert(!resource.nil?, "Server does not declare support for the #{daf_resource.
|
|
135
|
+
resource = rest.resource.select{|r|r.type==daf_resource.type}.first
|
|
136
|
+
assert(!resource.nil?, "Server does not declare support for the #{daf_resource.type} resource.")
|
|
121
137
|
|
|
122
138
|
# TODO move rest.resource.profile checks into DAF00
|
|
123
139
|
# check profile match
|
|
124
|
-
warning { assert(resource.profile.reference==daf_resource.profile.reference,"Profile for #{resource.
|
|
140
|
+
warning { assert(resource.profile.reference==daf_resource.profile.reference,"Profile for #{resource.type} does not match #{daf_resource.profile.reference}",resource.profile.reference) }
|
|
125
141
|
|
|
126
142
|
# check interaction.code (and interaction.extension.valueCode for SHALL/SHOULD)
|
|
127
|
-
shall_interactions = daf_resource.interaction.select{|x|x.extension.first.value
|
|
128
|
-
should_interactions = daf_resource.interaction.select{|x|x.extension.first.value
|
|
143
|
+
shall_interactions = daf_resource.interaction.select{|x|x.extension.first.value=='SHALL'}.map{|x|x.code}
|
|
144
|
+
should_interactions = daf_resource.interaction.select{|x|x.extension.first.value=='SHOULD'}.map{|x|x.code}
|
|
129
145
|
|
|
130
146
|
resource.interaction.each do |interaction|
|
|
131
147
|
should_interactions.delete(interaction.code)
|
|
132
148
|
shall_interactions.delete(interaction.code)
|
|
133
149
|
end
|
|
134
150
|
|
|
135
|
-
warning { assert(should_interactions.empty?,"Server does not declare support for the following SHOULD interactions on #{resource.
|
|
136
|
-
assert(shall_interactions.empty?,"Server does not declare support for the following SHALL interactions on #{resource.
|
|
151
|
+
warning { assert(should_interactions.empty?,"Server does not declare support for the following SHOULD interactions on #{resource.type}: #{should_interactions}") }
|
|
152
|
+
assert(shall_interactions.empty?,"Server does not declare support for the following SHALL interactions on #{resource.type}: #{shall_interactions}")
|
|
137
153
|
end
|
|
138
|
-
end
|
|
154
|
+
end
|
|
139
155
|
|
|
140
|
-
# Check that
|
|
141
|
-
test 'DAF03','Check
|
|
156
|
+
# Check that CapabilityStatement searchParams
|
|
157
|
+
test 'DAF03','Check CapabilityStatement Search Parameters against DAF CapabilityStatement' do
|
|
142
158
|
metadata {
|
|
143
159
|
links "#{REST_SPEC_LINK}#conformance"
|
|
144
160
|
links "#{BASE_SPEC_LINK}/conformance.html"
|
|
161
|
+
links "#{REST_SPEC_LINK}#capabilitystatement"
|
|
162
|
+
links "#{BASE_SPEC_LINK}/capabilitystatement.html"
|
|
145
163
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
146
164
|
requires resource: 'Conformance', methods: ['read']
|
|
165
|
+
requires resource: 'CapabilityStatement', methods: ['read']
|
|
147
166
|
validates resource: 'Conformance', methods: ['read']
|
|
167
|
+
validates resource: 'CapabilityStatement', methods: ['read']
|
|
148
168
|
}
|
|
149
169
|
|
|
170
|
+
assert(@conformance, 'No capability statement found.')
|
|
150
171
|
rest = @conformance.rest.first
|
|
151
172
|
rest = @conformance.rest[@rest_index] if @found_smart_code
|
|
152
173
|
|
|
153
174
|
@daf_conformance.rest.first.resource.each do |daf_resource|
|
|
154
|
-
resource = rest.resource.select{|r|r.
|
|
155
|
-
assert(!resource.nil?, "Server does not declare support for the #{daf_resource.
|
|
175
|
+
resource = rest.resource.select{|r|r.type==daf_resource.type}.first
|
|
176
|
+
assert(!resource.nil?, "Server does not declare support for the #{daf_resource.type} resource.")
|
|
156
177
|
|
|
157
178
|
# check searchParam.name
|
|
158
|
-
shall_params = daf_resource.searchParam.select{|x|x.extension.first.value
|
|
159
|
-
should_params = daf_resource.searchParam.select{|x|x.extension.first.value
|
|
179
|
+
shall_params = daf_resource.searchParam.select{|x|x.extension.first.value=='SHALL'}.map{|x|x.name}
|
|
180
|
+
should_params = daf_resource.searchParam.select{|x|x.extension.first.value=='SHOULD'}.map{|x|x.name}
|
|
160
181
|
|
|
161
182
|
resource.searchParam.each do |searchParam|
|
|
162
183
|
should_params.delete(searchParam.name)
|
|
163
184
|
shall_params.delete(searchParam.name)
|
|
164
185
|
end
|
|
165
186
|
|
|
166
|
-
warning { assert(should_params.empty?,"Server does not declare support for the following SHOULD searchParams on #{resource.
|
|
167
|
-
assert(shall_params.empty?,"Server does not declare support for the following SHALL searchParams on #{resource.
|
|
187
|
+
warning { assert(should_params.empty?,"Server does not declare support for the following SHOULD searchParams on #{resource.type}: #{should_params}") }
|
|
188
|
+
assert(shall_params.empty?,"Server does not declare support for the following SHALL searchParams on #{resource.type}: #{shall_params}")
|
|
168
189
|
|
|
169
190
|
# search chains
|
|
170
|
-
shall_chain = daf_resource.searchParam.select{|x|x.extension.first.value
|
|
171
|
-
should_chain = daf_resource.searchParam.select{|x|x.extension.first.value
|
|
191
|
+
shall_chain = daf_resource.searchParam.select{|x|x.extension.first.value=='SHALL'}.map{|x|x.chain}.flatten
|
|
192
|
+
should_chain = daf_resource.searchParam.select{|x|x.extension.first.value=='SHOULD'}.map{|x|x.chain}.flatten
|
|
172
193
|
|
|
173
194
|
resource.searchParam.each do |searchParam|
|
|
174
195
|
should_chain -= searchParam.chain
|
|
175
196
|
shall_chain -= searchParam.chain
|
|
176
197
|
end
|
|
177
198
|
|
|
178
|
-
warning { assert(should_chain.empty?,"Server does not declare support for the following SHOULD searchParam.chain on #{resource.
|
|
179
|
-
assert(shall_chain.empty?,"Server does not declare support for the following SHALL searchParam.chain on #{resource.
|
|
199
|
+
warning { assert(should_chain.empty?,"Server does not declare support for the following SHOULD searchParam.chain on #{resource.type}: #{should_chain}") }
|
|
200
|
+
assert(shall_chain.empty?,"Server does not declare support for the following SHALL searchParam.chain on #{resource.type}: #{shall_chain}")
|
|
180
201
|
|
|
181
202
|
# search includes
|
|
182
203
|
search_includes = daf_resource.searchInclude.map(&:clone)
|
|
183
204
|
search_includes -= resource.searchInclude
|
|
184
|
-
assert(search_includes.empty?,"Server does not declare support for the following SHALL searchIncludes on #{resource.
|
|
205
|
+
assert(search_includes.empty?,"Server does not declare support for the following SHALL searchIncludes on #{resource.type}: #{search_includes}")
|
|
185
206
|
end
|
|
186
|
-
end
|
|
207
|
+
end
|
|
187
208
|
|
|
188
|
-
# Check
|
|
189
|
-
test 'DAF04','Check
|
|
209
|
+
# Check CapabilityStatement for $everything on Patient and Encounter
|
|
210
|
+
test 'DAF04','Check CapabilityStatement for $everything on Patient and Encounter' do
|
|
190
211
|
metadata {
|
|
191
212
|
links "#{REST_SPEC_LINK}#conformance"
|
|
192
213
|
links "#{BASE_SPEC_LINK}/conformance.html"
|
|
214
|
+
links "#{REST_SPEC_LINK}#capabilitystatement"
|
|
215
|
+
links "#{BASE_SPEC_LINK}/capabilitystatement.html"
|
|
193
216
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
194
217
|
links "#{BASE_SPEC_LINK}/patient-operations.html#everything"
|
|
195
218
|
requires resource: 'Conformance', methods: ['read']
|
|
219
|
+
requires resource: 'CapabilityStatement', methods: ['read']
|
|
196
220
|
validates resource: 'Conformance', methods: ['read']
|
|
221
|
+
validates resource: 'CapabilityStatement', methods: ['read']
|
|
197
222
|
}
|
|
198
223
|
|
|
224
|
+
assert(@conformance, 'No capability statement found.')
|
|
199
225
|
rest = @conformance.rest.first
|
|
200
226
|
rest = @conformance.rest[@rest_index] if @found_smart_code
|
|
201
227
|
|
|
@@ -208,21 +234,26 @@ module Crucible
|
|
|
208
234
|
assert((supports_patient_everything || supports_encounter_everything || supports_ambiguous_everything), message)
|
|
209
235
|
warning{ assert((supports_patient_everything || supports_encounter_everything), "Ambiguous everything operation: cannot determine applicable resources. #{message}") }
|
|
210
236
|
warning{ assert(supports_patient_everything, "Cannot find Patient $everything operation. #{message}")}
|
|
211
|
-
warning{ assert(supports_encounter_everything, "Cannot find Encounter $everything operation. #{message}")}
|
|
237
|
+
warning{ assert(supports_encounter_everything, "Cannot find Encounter $everything operation. #{message}")}
|
|
212
238
|
end
|
|
213
239
|
|
|
214
|
-
# Check
|
|
240
|
+
# Check CapabilityStatement for $validate operation support
|
|
215
241
|
# NOT REQUIRED BY DAF IMPLEMENTATION GUIDE -- WARNING ONLY
|
|
216
|
-
test 'DAF05','Optional: Check
|
|
242
|
+
test 'DAF05','Optional: Check CapabilityStatement for $validate Operation Support' do
|
|
217
243
|
metadata {
|
|
218
244
|
links "#{REST_SPEC_LINK}#conformance"
|
|
219
245
|
links "#{BASE_SPEC_LINK}/conformance.html"
|
|
246
|
+
links "#{REST_SPEC_LINK}#capabilitystatement"
|
|
247
|
+
links "#{BASE_SPEC_LINK}/capabilitystatement.html"
|
|
220
248
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
221
249
|
links "#{BASE_SPEC_LINK}/resource-operations.html#validate"
|
|
222
250
|
requires resource: 'Conformance', methods: ['read']
|
|
251
|
+
requires resource: 'CapabilityStatement', methods: ['read']
|
|
223
252
|
validates resource: 'Conformance', methods: ['read']
|
|
253
|
+
validates resource: 'CapabilityStatement', methods: ['read']
|
|
224
254
|
}
|
|
225
255
|
|
|
256
|
+
assert(@conformance, 'No capability statement found.')
|
|
226
257
|
rest = @conformance.rest.first
|
|
227
258
|
rest = @conformance.rest[@rest_index] if @found_smart_code
|
|
228
259
|
|
|
@@ -231,23 +262,28 @@ module Crucible
|
|
|
231
262
|
warning{ assert(@supports_validate, message) }
|
|
232
263
|
end
|
|
233
264
|
|
|
234
|
-
# Check
|
|
265
|
+
# Check CapabilityStatement for transaction support
|
|
235
266
|
# NOT REQUIRED BY DAF IMPLEMENTATION GUIDE -- WARNING ONLY
|
|
236
|
-
test 'DAF06','Optional: Check
|
|
267
|
+
test 'DAF06','Optional: Check CapabilityStatement for Transaction Support' do
|
|
237
268
|
metadata {
|
|
238
269
|
links "#{REST_SPEC_LINK}#conformance"
|
|
239
270
|
links "#{BASE_SPEC_LINK}/conformance.html"
|
|
271
|
+
links "#{REST_SPEC_LINK}#capabilitystatement"
|
|
272
|
+
links "#{BASE_SPEC_LINK}/capabilitystatement.html"
|
|
240
273
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
241
274
|
links "#{REST_SPEC_LINK}#transaction"
|
|
242
275
|
requires resource: 'Conformance', methods: ['read']
|
|
276
|
+
requires resource: 'CapabilityStatement', methods: ['read']
|
|
243
277
|
validates resource: 'Conformance', methods: ['read']
|
|
278
|
+
validates resource: 'CapabilityStatement', methods: ['read']
|
|
244
279
|
}
|
|
245
280
|
|
|
281
|
+
assert(@conformance, 'No capability statement found.')
|
|
246
282
|
rest = @conformance.rest.first
|
|
247
283
|
rest = @conformance.rest[@rest_index] if @found_smart_code
|
|
248
284
|
|
|
249
285
|
has_transaction_interaction = rest.interaction.any?{|x|x.code=='transaction'}
|
|
250
|
-
has_transaction_mode = (!rest.
|
|
286
|
+
has_transaction_mode = (!rest.interaction.try(:first).nil? && rest.interaction.first !=' not-supported')
|
|
251
287
|
|
|
252
288
|
message = 'Although not required by the DAF Implementation Guide, the server should support transaction (preferred) or batch, to facilitate the transfer of patient records.'
|
|
253
289
|
|
|
@@ -263,18 +299,20 @@ module Crucible
|
|
|
263
299
|
# TRY TO SEARCH FOR DAF PROFILED RESOURCES... AND THEN HAVE OUR CLIENT VALIDATE THEM, IF THEY EXIST.
|
|
264
300
|
resources = Crucible::Generator::Resources.new
|
|
265
301
|
daf_conformance = resources.daf_conformance
|
|
266
|
-
daf_conformance.rest.first.resource.
|
|
302
|
+
daf_conformance.rest.first.resource.each_with_index do |daf_resource,index|
|
|
303
|
+
|
|
304
|
+
key = ((index+1)*10)
|
|
267
305
|
|
|
268
|
-
test "
|
|
306
|
+
test "DAF#{key+1}_#{daf_resource.type}", "Search #{daf_resource.type} for DAF-#{daf_resource.type} compliant resources" do
|
|
269
307
|
metadata {
|
|
270
308
|
links "#{BASE_SPEC_LINK}/resource.html#profile-tags"
|
|
271
|
-
links "#{BASE_SPEC_LINK}/daf/daf-#{daf_resource.
|
|
309
|
+
links "#{BASE_SPEC_LINK}/daf/daf-#{daf_resource.type.downcase}.html"
|
|
272
310
|
links "#{REST_SPEC_LINK}#search"
|
|
273
|
-
requires resource: "#{daf_resource.
|
|
274
|
-
validates resource: "#{daf_resource.
|
|
311
|
+
requires resource: "#{daf_resource.type}", methods: ['search']
|
|
312
|
+
validates resource: "#{daf_resource.type}", methods: ['search']
|
|
275
313
|
}
|
|
276
314
|
|
|
277
|
-
klass = "FHIR::#{daf_resource.
|
|
315
|
+
klass = "FHIR::#{daf_resource.type}".constantize
|
|
278
316
|
options = {
|
|
279
317
|
:search => {
|
|
280
318
|
:parameters => {
|
|
@@ -286,48 +324,48 @@ module Crucible
|
|
|
286
324
|
reply = @client.search(klass,options)
|
|
287
325
|
assert_response_ok(reply)
|
|
288
326
|
assert_bundle_response(reply)
|
|
289
|
-
warning{ assert((1 >= reply.resource.entry.size), "The server did not return any DAF-#{daf_resource.
|
|
327
|
+
warning{ assert((1 >= reply.resource.entry.size), "The server did not return any DAF-#{daf_resource.type}s.") }
|
|
290
328
|
|
|
291
329
|
if reply.resource.entry.size > 0
|
|
292
330
|
# store any results to a @server_side_resources
|
|
293
|
-
@server_side_resources[daf_resource.
|
|
331
|
+
@server_side_resources[daf_resource.type] = reply.resource.entry.map{|x|x.resource}
|
|
294
332
|
end
|
|
295
333
|
end
|
|
296
334
|
|
|
297
|
-
test "
|
|
335
|
+
test "DAF#{key+2}_#{daf_resource.type}", "Client-side validation of DAF-#{daf_resource.type} search results" do
|
|
298
336
|
metadata {
|
|
299
337
|
links "#{BASE_SPEC_LINK}/resource-operations.html#validate"
|
|
300
|
-
links "#{BASE_SPEC_LINK}/daf/daf-#{daf_resource.
|
|
338
|
+
links "#{BASE_SPEC_LINK}/daf/daf-#{daf_resource.type.downcase}.html"
|
|
301
339
|
}
|
|
302
|
-
resource = @server_side_resources[daf_resource.
|
|
340
|
+
resource = @server_side_resources[daf_resource.type]
|
|
303
341
|
skip if resource.nil? || resource.empty?
|
|
304
|
-
|
|
305
|
-
profiles = FHIR::
|
|
306
|
-
profile = profiles.select{|x|x.
|
|
342
|
+
|
|
343
|
+
profiles = FHIR::Definitions.get_profiles_for_resource(daf_resource.type)
|
|
344
|
+
profile = profiles.select{|x|x.id.start_with?'daf'}.first
|
|
307
345
|
skip if profile.nil?
|
|
308
346
|
|
|
309
347
|
resource.each do |r|
|
|
310
|
-
assert(profile.is_valid?(r),"The #{daf_resource.
|
|
348
|
+
assert(profile.is_valid?(r),"The #{daf_resource.type} with ID #{r.id} is not DAF compliant but claims to be.",r.to_xml)
|
|
311
349
|
end
|
|
312
350
|
end
|
|
313
351
|
|
|
314
352
|
# if there are any profiled results in the @variable, and the server supports $validate, then $validate them
|
|
315
|
-
test "
|
|
353
|
+
test "DAF#{key+3}_#{daf_resource.type}", "Server-side validation of DAF-#{daf_resource.type} search results" do
|
|
316
354
|
metadata {
|
|
317
355
|
links "#{BASE_SPEC_LINK}/resource-operations.html#validate"
|
|
318
|
-
links "#{BASE_SPEC_LINK}/daf/daf-#{daf_resource.
|
|
319
|
-
validates resource: "#{daf_resource.
|
|
356
|
+
links "#{BASE_SPEC_LINK}/daf/daf-#{daf_resource.type.downcase}.html"
|
|
357
|
+
validates resource: "#{daf_resource.type}", methods: ['$validate']
|
|
320
358
|
validates profiles: ['validate-profile']
|
|
321
359
|
}
|
|
322
360
|
skip unless @supports_validate
|
|
323
|
-
resource = @server_side_resources[daf_resource.
|
|
361
|
+
resource = @server_side_resources[daf_resource.type]
|
|
324
362
|
skip if resource.nil? || resource.empty?
|
|
325
363
|
|
|
326
364
|
resource.each do |r|
|
|
327
365
|
reply = @client.validate(r,{profile_uri: daf_resource.profile.reference})
|
|
328
366
|
assert_response_ok(reply)
|
|
329
367
|
if !reply.id.nil?
|
|
330
|
-
assert( !reply.id.include?('validate'), "Server created an #{daf_resource.
|
|
368
|
+
assert( !reply.id.include?('validate'), "Server created an #{daf_resource.type} with the ID `#{reply.resource.id}` rather than validate the resource.", reply.id)
|
|
331
369
|
end
|
|
332
370
|
end
|
|
333
371
|
end
|
|
@@ -335,7 +373,7 @@ module Crucible
|
|
|
335
373
|
end
|
|
336
374
|
|
|
337
375
|
# Validate invalid DAF patient
|
|
338
|
-
test '
|
|
376
|
+
test 'DAF07', 'Optional: Server should not $validate an invalid DAF-Patient' do
|
|
339
377
|
metadata {
|
|
340
378
|
links "#{BASE_SPEC_LINK}/patient.html"
|
|
341
379
|
links "#{BASE_SPEC_LINK}/daf/daf-patient.html"
|
|
@@ -346,7 +384,7 @@ module Crucible
|
|
|
346
384
|
}
|
|
347
385
|
skip unless @supports_validate
|
|
348
386
|
|
|
349
|
-
# Removing the identifier and adding an "animal" to the
|
|
387
|
+
# Removing the identifier and adding an "animal" to the
|
|
350
388
|
# Patient violates the DAF-Patient profile.
|
|
351
389
|
patient = Crucible::Tests::DAFResourceGenerator.daf_patient
|
|
352
390
|
patient.identifier = nil
|
|
@@ -354,6 +392,8 @@ module Crucible
|
|
|
354
392
|
|
|
355
393
|
reply = @client.validate(patient,{profile_uri: patient.meta.profile.first})
|
|
356
394
|
assert_response_ok(reply)
|
|
395
|
+
reply_resource = @client.parse_reply(FHIR::OperationOutcome, @client.default_format, reply)
|
|
396
|
+
reply.resource = reply_resource
|
|
357
397
|
assert_resource_type(reply,FHIR::OperationOutcome)
|
|
358
398
|
failed = reply.resource.issue.any?{|x|['fatal','error'].include?(x.severity) || x.code=='invalid' }
|
|
359
399
|
assert(failed,'The server failed to reject an invalid DAF-Patient.')
|
|
@@ -364,7 +404,7 @@ module Crucible
|
|
|
364
404
|
# Search for DAF Profile fixtures (including by using DAF extensions)
|
|
365
405
|
|
|
366
406
|
# Test $everything on Patient and Encounter
|
|
367
|
-
test '
|
|
407
|
+
test 'DAF08','Test $everything on Patient' do
|
|
368
408
|
metadata {
|
|
369
409
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
370
410
|
links "#{BASE_SPEC_LINK}/patient-operations.html#everything"
|
|
@@ -388,13 +428,13 @@ module Crucible
|
|
|
388
428
|
end
|
|
389
429
|
skip if resource.nil? || resource.empty?
|
|
390
430
|
|
|
391
|
-
reply = @client.fetch_patient_record(resource.first.
|
|
431
|
+
reply = @client.fetch_patient_record(resource.first.id)
|
|
392
432
|
|
|
393
433
|
assert_response_ok(reply)
|
|
394
434
|
assert_bundle_response(reply)
|
|
395
435
|
end
|
|
396
436
|
|
|
397
|
-
test '
|
|
437
|
+
test 'DAF09','Test $everything on Encounter' do
|
|
398
438
|
metadata {
|
|
399
439
|
links "#{BASE_SPEC_LINK}/daf/daf.html"
|
|
400
440
|
links "#{BASE_SPEC_LINK}/encounter-operations.html#everything"
|
|
@@ -415,17 +455,17 @@ module Crucible
|
|
|
415
455
|
assert_response_ok(reply)
|
|
416
456
|
assert_bundle_response(reply)
|
|
417
457
|
resource = reply.resource.entry.map{|x|x.resource}
|
|
418
|
-
end
|
|
458
|
+
end
|
|
419
459
|
skip if resource.nil? || resource.empty?
|
|
420
460
|
|
|
421
|
-
reply = @client.fetch_encounter_record(resource.first.
|
|
461
|
+
reply = @client.fetch_encounter_record(resource.first.id)
|
|
422
462
|
|
|
423
463
|
assert_response_ok(reply)
|
|
424
464
|
assert_bundle_response(reply)
|
|
425
465
|
end
|
|
426
466
|
|
|
427
467
|
# The DAF Responder SHALL identify the DAF profile(s) supported as part of the FHIR BaseResource.Meta.profile attribute for each instance.
|
|
428
|
-
|
|
468
|
+
|
|
429
469
|
end
|
|
430
470
|
end
|
|
431
471
|
end
|