Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for History operation #1

Merged
merged 7 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added fixtures and TestScripts for Observation Resource
  • Loading branch information
jhlee-mitre committed May 12, 2022
commit 1d46bd19041cf738aedb9aae99719ef8ab063eef
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ The TestScript Execution Engine is to support FHIR testing in an integrated and
* (TBA) Support an end-to-end pipeline of FHIR testing including authoring exception handling and analytics
jhlee-mitre marked this conversation as resolved.
Show resolved Hide resolved
* (TBA) Integration of FHIR Shorthand as a TestScript authoring environment

### Limitations

TestScript Execution Engine is in the early stages of development; it is neither functionally complete nor bug-free.
jhlee-mitre marked this conversation as resolved.
Show resolved Hide resolved


### Getting started

Expand Down
Binary file added TestReports/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion TestReports/example_general.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"result": "fail",
"score": 88.89,
"tester": "The MITRE Corporation",
"issued": "2022-04-25T10:03:21-04:00",
"issued": "2022-05-11T23:27:33-06:00",
"setup": {
"action": [
{
Expand Down
159 changes: 159 additions & 0 deletions TestReports/example_general_observation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
{
"id": "testscript-example-observation",
"language": {
"system": "http:https://hl7.org/fhir/ValueSet/languages",
"code": "en"
},
"name": "TestReport Example General Observation",
"status": "completed",
"testScript": {
"reference": "../TestScripts/general_test_script_obs.json"
},
"result": "fail",
"score": 86.67,
"tester": "The MITRE Corporation",
"issued": "2022-05-11T23:27:35-06:00",
"setup": {
"action": [
{
"operation": {
"id": "SetupDeleteObservation",
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"operation": {
"id": "SetupCreateObservation",
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "fail"
},
"message": "[.assert_response_code] Expected 200 but found 201."
}
},
{
"operation": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
}
]
},
"test": [
{
"name": "Read Observation",
"description": "Read a Observation and validate response.",
"action": [
{
"operation": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"id": "01-ReadObservationOK",
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "fail"
},
"message": "badValidation"
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "warning"
},
"message": "[.assert_minimum_id] Expected resource with id: fixture-observation-minimum in fixtures, responses, or in last reply from server. No such resource found."
}
}
]
}
],
"teardown": {
"action": [
{
"operation": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
}
]
},
"resourceType": "TestReport"
}
19 changes: 11 additions & 8 deletions TestReports/example_history.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"reference": "../TestScripts/history_test_script.json"
},
"result": "fail",
"score": 63.64,
"score": 36.36,
"tester": "The MITRE Corporation",
"issued": "2022-05-11T00:08:11-06:00",
"issued": "2022-05-11T23:27:37-06:00",
"setup": {
"action": [
{
Expand Down Expand Up @@ -88,16 +88,18 @@
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
"code": "fail"
},
"message": "[.assert_response] Expected 200 but found 404."
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
"code": "fail"
},
"message": "[.assert_resource] Expected Bundle but found OperationOutcome."
}
},
{
Expand All @@ -113,8 +115,9 @@
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
"code": "fail"
},
"message": "[.assert_path] Expected history but found nothing."
}
}
]
Expand Down
124 changes: 124 additions & 0 deletions TestReports/example_history_observation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"id": "testscript-example-history-observation",
"language": {
"system": "http:https://hl7.org/fhir/ValueSet/languages",
"code": "en"
},
"name": "TestReport Example History Observation",
"status": "completed",
"testScript": {
"reference": "../TestScripts/history_test_script_obs.json"
},
"result": "fail",
"score": 63.64,
"tester": "The MITRE Corporation",
"issued": "2022-05-11T23:27:39-06:00",
"setup": {
"action": [
{
"operation": {
"id": "SetupDeleteObservation",
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"operation": {
"id": "SetupCreateObservation",
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"operation": {
"id": "SetupUpdateObservation",
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
}
]
},
"test": [
{
"name": "History Observation",
"description": "Get the history for a known Observation and validate response.",
"action": [
{
"operation": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "pass"
}
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "fail"
},
"message": "[.assert_response] Expected 200 but found 404."
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "fail"
},
"message": "[.assert_resource] Expected Bundle but found OperationOutcome."
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "fail"
},
"message": "badValidation"
}
},
{
"assert": {
"result": {
"system": "http:https://hl7.org/fhir/ValueSet/report-action-result-codes",
"code": "fail"
},
"message": "[.assert_path] Expected history but found nothing."
}
}
]
}
],
"resourceType": "TestReport"
}
2 changes: 1 addition & 1 deletion TestReports/example_read_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"result": "fail",
"score": 91.67,
"tester": "The MITRE Corporation",
"issued": "2022-05-10T17:10:45-06:00",
"issued": "2022-05-11T23:27:40-06:00",
"test": [
{
"name": "Sprinkler Read Test R001",
Expand Down
Loading