-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update test cases with SHINNY IG version 0.8.0
- Loading branch information
1 parent
7706e9a
commit 9395cc6
Showing
18 changed files
with
7,093 additions
and
2 deletions.
There are no files selected for viewing
842 changes: 842 additions & 0 deletions
842
...ion-test-prime/fhir-service-prime/src/2024-07-18/AHCHRSNQuestionnaireResponseExample.json
Large diffs are not rendered by default.
Oops, something went wrong.
2,731 changes: 2,731 additions & 0 deletions
2,731
...ression-test-prime/fhir-service-prime/src/2024-07-18/AHCHRSNScreeningResponseExample.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,293 changes: 1,293 additions & 0 deletions
1,293
...g/regression-test-prime/fhir-service-prime/src/2024-07-18/NYScreeningResponseExample.json
Large diffs are not rendered by default.
Oops, something went wrong.
75 changes: 75 additions & 0 deletions
75
...rsn/screening/regression-test-prime/fhir-service-prime/src/2024-07-18/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
## Steps to test the .http files through CLI | ||
|
||
```bash | ||
$ npm install -g httpyac | ||
$ cd assurance/1115-waiver/ahc-hrsn/screening/regression-test-prime/fhir-service-prime/src/YYYY-MM-DD | ||
$ HOST=https://synthetic.fhir.api.devl.techbd.org httpyac send fhir-service.test.http --all | ||
``` | ||
|
||
For more complete example, see [regression-test.sh](../../../regression-test.sh) | ||
|
||
### `fhir-service.test.http` | ||
|
||
This is the REST-API execution file performs the actual test. It interacts | ||
with two primary API endpoints (`/Bundle/$validate` & `/Bundle/`) to ensure they are | ||
functioning as expected. | ||
|
||
#### Running httpYac tests in Postman | ||
|
||
For developers who prefer to use Postman for API testing and debugging, you can easily convert `fhir-service.test.http` httpYac file to Postman: | ||
|
||
- Open the `fhir-service.test.http` and familiarize yourself with the structure of the file. You will see sections defining HTTP requests, including HTTP methods (GET, POST, etc.), URLs, headers, and body content. | ||
- Open Postman and create a new collection. | ||
- Add a new request to the collection for each HTTP request defined in the `fhir-service.test.http` file: | ||
- Copy the method (GET, POST, etc.) from the httpYac file and set it in Postman. | ||
- Copy the URL from the httpYac file and paste it into the Postman request URL field. | ||
- **NOTE:** Pay attention to the header `X-TechBD-Tenant-ID: TECH_BD_FHIR_SERVICE_QE_IDENTIFIER`. When using your tool instead of HTTP YAC (e.g., Postman), ensure this header is passed correctly according to your API requirements. | ||
**Example:** | ||
- Key: `X-TechBD-Tenant-ID` | ||
- Value: `CommonTenant123` | ||
- Set the request headers in Postman by copying the headers from the httpYac file. Ensure each header key and value is correctly set. | ||
- If the request includes a body, copy the body content from the httpYac file and paste it into the Postman body section. Select the appropriate body type (e.g., raw, JSON, form-data). | ||
- Be sure to replace variables as necessary | ||
|
||
### `AHCHRSNQuestionnaireResponseExample.json` | ||
|
||
This JSON file contains sample data compliant with the implementation guidelines | ||
of our FHIR service. It is used within the .http tests to simulate valid data | ||
submission. | ||
|
||
### `AHCHRSNScreeningResponseExample.json` | ||
|
||
This JSON file contains sample data compliant with the implementation guidelines | ||
of our FHIR service. It is used within the .http tests to simulate valid data | ||
submission. | ||
|
||
### `NYScreeningResponseExample.json` | ||
|
||
This JSON file contains sample data compliant with the implementation guidelines | ||
of our FHIR service. It is used within the .http tests to simulate valid data | ||
submission. | ||
|
||
### `ServiceRequestExample.json` | ||
|
||
This JSON file contains sample data compliant with the implementation guidelines | ||
of our FHIR service. It is used within the .http tests to simulate valid data | ||
submission. | ||
|
||
### `TaskCompletedExample.json` | ||
|
||
This JSON file contains sample data compliant with the implementation guidelines | ||
of our FHIR service. It is used within the .http tests to simulate valid data | ||
submission. | ||
|
||
### `TaskExample.json` | ||
|
||
This JSON file contains sample data compliant with the implementation guidelines | ||
of our FHIR service. It is used within the .http tests to simulate valid data | ||
submission. | ||
|
||
### `TaskOutputProcedureExample.json` | ||
|
||
This JSON file contains sample data compliant with the implementation guidelines | ||
of our FHIR service. It is used within the .http tests to simulate valid data | ||
submission. | ||
|
475 changes: 475 additions & 0 deletions
475
...eening/regression-test-prime/fhir-service-prime/src/2024-07-18/ServiceRequestExample.json
Large diffs are not rendered by default.
Oops, something went wrong.
377 changes: 377 additions & 0 deletions
377
...reening/regression-test-prime/fhir-service-prime/src/2024-07-18/TaskCompletedExample.json
Large diffs are not rendered by default.
Oops, something went wrong.
493 changes: 493 additions & 0 deletions
493
...c-hrsn/screening/regression-test-prime/fhir-service-prime/src/2024-07-18/TaskExample.json
Large diffs are not rendered by default.
Oops, something went wrong.
435 changes: 435 additions & 0 deletions
435
...g/regression-test-prime/fhir-service-prime/src/2024-07-18/TaskOutputProcedureExample.json
Large diffs are not rendered by default.
Oops, something went wrong.
130 changes: 130 additions & 0 deletions
130
.../screening/regression-test-prime/fhir-service-prime/src/2024-07-18/fhir-service.test.http
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# this file is for testing and verifying the FHIR service with two api endpoints | ||
# ------------------------------------------------------------------------ | ||
# * requires the `vscode-httpyac` Visual Studio Code extension within IDE | ||
# or httpYac CLI when executing outside of the IDE | ||
# * this service has 2 endpoints /Bundle/$validate & /Bundle/ | ||
|
||
@hostName = http://localhost:8080 | ||
{{ | ||
// dotEnv is loaded by default so let's see if custom hostName is available; | ||
// if $HTTPYAC_HOST is available use it first otherwise use $HOST | ||
if(process.env.HOST) exports.hostName = process.env.HOST; | ||
if(process.env.HTTPYAC_HOST) exports.hostName = process.env.HTTPYAC_HOST; | ||
}} | ||
|
||
@contentType = application/json | ||
@contentTypeFHIR = application/fhir+json | ||
@TECH_BD_FHIR_SERVICE_QE_IDENTIFIER = QC-TEST | ||
|
||
|
||
### /metadata endpoint should return FHIR CapabilityStatement | ||
GET {{hostName}}/metadata | ||
Content-Type: {{contentType}} | ||
?? status == 200 | ||
?? header content-type == text/html;charset=UTF-8 | ||
?? response.body != null | ||
|
||
### /Bundle/$validate should validate AHCHRSNQuestionnaireResponseExample.json with Content-Type application/json | ||
POST {{hostName}}/Bundle/$validate HTTP/1.1 | ||
Content-Type: {{contentTypeFHIR}} | ||
X-TechBD-Tenant-ID: {{TECH_BD_FHIR_SERVICE_QE_IDENTIFIER}} | ||
?? status == 200 | ||
?? response.body != null | ||
?? js response.parsedBody.OperationOutcome.resourceType == OperationOutcome | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].operationOutcome.issue[0].severity == information | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].valid == true | ||
|
||
< AHCHRSNQuestionnaireResponseExample.json | ||
|
||
### /Bundle/$validate should validate AHCHRSNScreeningResponseExample.json with Content-Type application/json | ||
|
||
POST {{hostName}}/Bundle/$validate HTTP/1.1 | ||
Content-Type: {{contentTypeFHIR}} | ||
X-TechBD-Tenant-ID: {{TECH_BD_FHIR_SERVICE_QE_IDENTIFIER}} | ||
?? status == 200 | ||
?? response.body != null | ||
?? js response.parsedBody.OperationOutcome.resourceType == OperationOutcome | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].operationOutcome.issue[0].severity == information | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].valid == true | ||
|
||
< AHCHRSNScreeningResponseExample.json | ||
|
||
|
||
### /Bundle/$validate should validate NYScreeningResponseExample.json with Content-Type application/json | ||
|
||
POST {{hostName}}/Bundle/$validate HTTP/1.1 | ||
Content-Type: {{contentTypeFHIR}} | ||
X-TechBD-Tenant-ID: {{TECH_BD_FHIR_SERVICE_QE_IDENTIFIER}} | ||
?? status == 200 | ||
?? response.body != null | ||
?? js response.parsedBody.OperationOutcome.resourceType == OperationOutcome | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].operationOutcome.issue[0].severity == information | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].valid == true | ||
|
||
< NYScreeningResponseExample.json | ||
|
||
|
||
### /Bundle/$validate should validate ServiceRequestExample.json with Content-Type application/json | ||
|
||
POST {{hostName}}/Bundle/$validate HTTP/1.1 | ||
Content-Type: {{contentTypeFHIR}} | ||
X-TechBD-Tenant-ID: {{TECH_BD_FHIR_SERVICE_QE_IDENTIFIER}} | ||
?? status == 200 | ||
?? response.body != null | ||
?? js response.parsedBody.OperationOutcome.resourceType == OperationOutcome | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].operationOutcome.issue[0].severity == information | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].valid == true | ||
|
||
< ServiceRequestExample.json | ||
|
||
### /Bundle/$validate should validate TaskCompletedExample.json with Content-Type application/json | ||
|
||
POST {{hostName}}/Bundle/$validate HTTP/1.1 | ||
Content-Type: {{contentTypeFHIR}} | ||
X-TechBD-Tenant-ID: {{TECH_BD_FHIR_SERVICE_QE_IDENTIFIER}} | ||
?? status == 200 | ||
?? response.body != null | ||
?? js response.parsedBody.OperationOutcome.resourceType == OperationOutcome | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].issues[0].severity == FATAL | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].issues[0].location.line == null | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].issues[0].location.column == null | ||
|
||
< TaskCompletedExample.json | ||
|
||
### /Bundle/$validate should validate TaskExample.json with Content-Type application/json | ||
|
||
POST {{hostName}}/Bundle/$validate HTTP/1.1 | ||
Content-Type: {{contentTypeFHIR}} | ||
X-TechBD-Tenant-ID: {{TECH_BD_FHIR_SERVICE_QE_IDENTIFIER}} | ||
?? status == 200 | ||
?? response.body != null | ||
?? js response.parsedBody.OperationOutcome.resourceType == OperationOutcome | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].operationOutcome.issue[0].severity == information | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].valid == true | ||
|
||
< TaskExample.json | ||
|
||
|
||
### /Bundle/$validate should validate TaskOutputProcedureExample.json with Content-Type application/json | ||
|
||
POST {{hostName}}/Bundle/$validate HTTP/1.1 | ||
Content-Type: {{contentTypeFHIR}} | ||
X-TechBD-Tenant-ID: {{TECH_BD_FHIR_SERVICE_QE_IDENTIFIER}} | ||
?? status == 200 | ||
?? js response.parsedBody.OperationOutcome.resourceType == OperationOutcome | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].issues[0].severity == FATAL | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].issues[0].location.line == null | ||
?? js response.parsedBody.OperationOutcome.validationResults[0].issues[0].location.column == null | ||
|
||
< TaskOutputProcedureExample.json | ||
|
||
|
||
### Bundle should validate and submit TestServiceRequest.json as @TECH_BD_FHIR_SERVICE_QE_IDENTIFIER - with Content-Type application/fhir+json | ||
# DO NOT use any header variables which are not required by QEs | ||
POST {{hostName}}/Bundle HTTP/1.1 | ||
Content-Type: {{contentTypeFHIR}} | ||
X-TechBD-Tenant-ID: {{TECH_BD_FHIR_SERVICE_QE_IDENTIFIER}} | ||
?? status == 200 | ||
?? response.body != null | ||
|
||
< AHCHRSNQuestionnaireResponseExample.json |
34 changes: 34 additions & 0 deletions
34
.../fhir-service-prime/src/2024-07-18/output/AHCHRSNQuestionnaireResponseExample_output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"OperationOutcome": { | ||
"validationResults": [ | ||
{ | ||
"profileUrl": "https://djq7jdt8kb490.cloudfront.net/1115/StructureDefinition-SHINNYBundleProfile.json", | ||
"initiatedAt": 1721309030.0284233, | ||
"observability": { | ||
"identity": "org.techbd.orchestrate.fhir.OrchestrationEngine$HapiValidationEngine", | ||
"name": "HAPI version 7.2.0 (TODO:get from API instead of hard coding) (FHIR version 4.0.1)", | ||
"initAt": 1721307520.3718407, | ||
"constructedAt": 1721307520.3942602 | ||
}, | ||
"issues": [], | ||
"operationOutcome": { | ||
"resourceType": "OperationOutcome", | ||
"issue": [ | ||
{ | ||
"severity": "information", | ||
"code": "informational", | ||
"diagnostics": "No issues detected during validation" | ||
} | ||
] | ||
}, | ||
"completedAt": 1721309030.0443616, | ||
"valid": true | ||
} | ||
], | ||
"device": { | ||
"deviceId": "127.0.1.1", | ||
"deviceName": "vinod-OptiPlex" | ||
}, | ||
"resourceType": "OperationOutcome" | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...rime/fhir-service-prime/src/2024-07-18/output/AHCHRSNScreeningResponseExample_output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"OperationOutcome": { | ||
"validationResults": [ | ||
{ | ||
"profileUrl": "https://djq7jdt8kb490.cloudfront.net/1115/StructureDefinition-SHINNYBundleProfile.json", | ||
"initiatedAt": 1721309017.5284915, | ||
"observability": { | ||
"identity": "org.techbd.orchestrate.fhir.OrchestrationEngine$HapiValidationEngine", | ||
"name": "HAPI version 7.2.0 (TODO:get from API instead of hard coding) (FHIR version 4.0.1)", | ||
"initAt": 1721307520.3718407, | ||
"constructedAt": 1721307520.3942602 | ||
}, | ||
"issues": [], | ||
"operationOutcome": { | ||
"resourceType": "OperationOutcome", | ||
"issue": [ | ||
{ | ||
"severity": "information", | ||
"code": "informational", | ||
"diagnostics": "No issues detected during validation" | ||
} | ||
] | ||
}, | ||
"completedAt": 1721309017.5859475, | ||
"valid": true | ||
} | ||
], | ||
"device": { | ||
"deviceId": "127.0.1.1", | ||
"deviceName": "vinod-OptiPlex" | ||
}, | ||
"resourceType": "OperationOutcome" | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...est-prime/fhir-service-prime/src/2024-07-18/output/NYScreeningResponseExample_output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"OperationOutcome": { | ||
"validationResults": [ | ||
{ | ||
"profileUrl": "https://djq7jdt8kb490.cloudfront.net/1115/StructureDefinition-SHINNYBundleProfile.json", | ||
"initiatedAt": 1721309057.7521017, | ||
"observability": { | ||
"identity": "org.techbd.orchestrate.fhir.OrchestrationEngine$HapiValidationEngine", | ||
"name": "HAPI version 7.2.0 (TODO:get from API instead of hard coding) (FHIR version 4.0.1)", | ||
"initAt": 1721307520.3718407, | ||
"constructedAt": 1721307520.3942602 | ||
}, | ||
"issues": [], | ||
"operationOutcome": { | ||
"resourceType": "OperationOutcome", | ||
"issue": [ | ||
{ | ||
"severity": "information", | ||
"code": "informational", | ||
"diagnostics": "No issues detected during validation" | ||
} | ||
] | ||
}, | ||
"completedAt": 1721309057.7726681, | ||
"valid": true | ||
} | ||
], | ||
"device": { | ||
"deviceId": "127.0.1.1", | ||
"deviceName": "vinod-OptiPlex" | ||
}, | ||
"resourceType": "OperationOutcome" | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...ion-test-prime/fhir-service-prime/src/2024-07-18/output/ServiceRequestExample_output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"OperationOutcome": { | ||
"validationResults": [ | ||
{ | ||
"profileUrl": "https://djq7jdt8kb490.cloudfront.net/1115/StructureDefinition-SHINNYBundleProfile.json", | ||
"initiatedAt": 1721309074.9637384, | ||
"observability": { | ||
"identity": "org.techbd.orchestrate.fhir.OrchestrationEngine$HapiValidationEngine", | ||
"name": "HAPI version 7.2.0 (TODO:get from API instead of hard coding) (FHIR version 4.0.1)", | ||
"initAt": 1721307520.3718407, | ||
"constructedAt": 1721307520.3942602 | ||
}, | ||
"issues": [], | ||
"operationOutcome": { | ||
"resourceType": "OperationOutcome", | ||
"issue": [ | ||
{ | ||
"severity": "information", | ||
"code": "informational", | ||
"diagnostics": "No issues detected during validation" | ||
} | ||
] | ||
}, | ||
"completedAt": 1721309074.9725552, | ||
"valid": true | ||
} | ||
], | ||
"device": { | ||
"deviceId": "127.0.1.1", | ||
"deviceName": "vinod-OptiPlex" | ||
}, | ||
"resourceType": "OperationOutcome" | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...sion-test-prime/fhir-service-prime/src/2024-07-18/output/TaskCompletedExample_output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"OperationOutcome": { | ||
"validationResults": [ | ||
{ | ||
"profileUrl": "https://djq7jdt8kb490.cloudfront.net/1115/StructureDefinition-SHINNYBundleProfile.json", | ||
"initiatedAt": 1721308927.2665904, | ||
"observability": { | ||
"identity": "org.techbd.orchestrate.fhir.OrchestrationEngine$HapiValidationEngine", | ||
"name": "HAPI version 7.2.0 (TODO:get from API instead of hard coding) (FHIR version 4.0.1)", | ||
"initAt": 1721307520.3718407, | ||
"constructedAt": 1721307520.3942602 | ||
}, | ||
"issues": [ | ||
{ | ||
"location": { | ||
"line": null, | ||
"column": null, | ||
"diagnostics": "ca.uhn.fhir.parser.DataFormatException" | ||
}, | ||
"message": "HAPI-1821: [element=\"status\"] Invalid attribute value \"complete\": Unknown ServiceRequestStatus code 'complete'", | ||
"severity": "FATAL" | ||
} | ||
], | ||
"operationOutcome": null, | ||
"completedAt": 1721308927.2861278, | ||
"valid": false | ||
} | ||
], | ||
"device": { | ||
"deviceId": "127.0.1.1", | ||
"deviceName": "vinod-OptiPlex" | ||
}, | ||
"resourceType": "OperationOutcome" | ||
} | ||
} |
Oops, something went wrong.