|
992 | 992 | } |
993 | 993 | ], |
994 | 994 | "url": { |
995 | | - "raw": "{{api_base_url}}/RelatedPerson?patient:identifier=9000000009", |
| 995 | + "raw": "{{api_base_url}}/RelatedPerson", |
996 | 996 | "host": [ |
997 | 997 | "{{api_base_url}}" |
998 | 998 | ], |
999 | 999 | "path": [ |
1000 | 1000 | "RelatedPerson" |
1001 | | - ], |
1002 | | - "query": [ |
1003 | | - { |
1004 | | - "key": "patient:identifier", |
1005 | | - "value": "9000000009" |
1006 | | - } |
1007 | 1001 | ] |
1008 | 1002 | }, |
1009 | 1003 | "description": "Example of an error response when the NHS number is missing" |
|
1098 | 1092 | "script": { |
1099 | 1093 | "exec": [ |
1100 | 1094 | "var expectedResponseBody = {", |
1101 | | - " \"resourceType\": \"OperationOutcome\",", |
1102 | | - " \"issue\": [", |
1103 | | - " {", |
1104 | | - " \"severity\": \"error\",", |
1105 | | - " \"code\": \"invalid\",", |
1106 | | - " \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",", |
1107 | | - " \"expression\": \"RelatedPerson.identifier\",", |
1108 | | - " \"details\": {", |
1109 | | - " \"coding\": [", |
1110 | | - " {", |
1111 | | - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", |
1112 | | - " \"version\": \"1\",", |
1113 | | - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", |
1114 | | - " \"display\": \"Provided value is invalid\"", |
1115 | | - " }", |
1116 | | - " ]", |
1117 | | - " }", |
1118 | | - " }", |
1119 | | - " ]", |
1120 | | - "};", |
| 1095 | + " \"issue\": [", |
| 1096 | + " {", |
| 1097 | + " \"code\": \"invalid\",", |
| 1098 | + " \"details\": {", |
| 1099 | + " \"coding\": [", |
| 1100 | + " {", |
| 1101 | + " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", |
| 1102 | + " \"display\": \"Invalid identifier system.\",", |
| 1103 | + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", |
| 1104 | + " \"version\": \"1\"", |
| 1105 | + " }", |
| 1106 | + " ]", |
| 1107 | + " },", |
| 1108 | + " \"diagnostics\": \"The identifier system is not valid.\",", |
| 1109 | + " \"severity\": \"error\"", |
| 1110 | + " }", |
| 1111 | + " ],", |
| 1112 | + " \"resourceType\": \"OperationOutcome\"", |
| 1113 | + "}", |
1121 | 1114 | "", |
1122 | 1115 | "const responseJson = pm.response.json();", |
1123 | 1116 | "", |
|
1126 | 1119 | "});", |
1127 | 1120 | "", |
1128 | 1121 | "pm.test(\"Should have correct error response\", () => {", |
1129 | | - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", |
| 1122 | + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", |
1130 | 1123 | "});", |
1131 | 1124 | "", |
1132 | 1125 | "pm.test(\"Should have correct response body\", () => {", |
|
1152 | 1145 | } |
1153 | 1146 | ], |
1154 | 1147 | "url": { |
1155 | | - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/A730675929", |
| 1148 | + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number|A730675929", |
1156 | 1149 | "host": [ |
1157 | 1150 | "{{api_base_url}}" |
1158 | 1151 | ], |
|
1162 | 1155 | "query": [ |
1163 | 1156 | { |
1164 | 1157 | "key": "identifier", |
1165 | | - "value": "https://fhir.nhs.uk/Id/nhs-number/A730675929" |
| 1158 | + "value": "https://fhir.nhs.uk/Id/nhs-number|A730675929" |
1166 | 1159 | } |
1167 | 1160 | ] |
1168 | 1161 | }, |
|
4442 | 4435 | "script": { |
4443 | 4436 | "exec": [ |
4444 | 4437 | "const expectedResponseBody = {", |
4445 | | - " \"resourceType\": \"OperationOutcome\",", |
4446 | 4438 | " \"issue\": [", |
4447 | 4439 | " {", |
4448 | | - " \"severity\": \"error\",", |
4449 | 4440 | " \"code\": \"invalid\",", |
4450 | | - " \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",", |
4451 | | - " \"expression\": \"RelatedPerson.identifier\",", |
4452 | 4441 | " \"details\": {", |
4453 | 4442 | " \"coding\": [", |
4454 | 4443 | " {", |
| 4444 | + " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", |
| 4445 | + " \"display\": \"Invalid identifier system.\",", |
4455 | 4446 | " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", |
4456 | | - " \"version\": \"1\",", |
4457 | | - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", |
4458 | | - " \"display\": \"Provided value is invalid\"", |
| 4447 | + " \"version\": \"1\"", |
4459 | 4448 | " }", |
4460 | 4449 | " ]", |
4461 | | - " }", |
| 4450 | + " },", |
| 4451 | + " \"diagnostics\": \"The identifier system is not valid.\",", |
| 4452 | + " \"severity\": \"error\"", |
4462 | 4453 | " }", |
4463 | | - " ]", |
| 4454 | + " ],", |
| 4455 | + " \"resourceType\": \"OperationOutcome\"", |
4464 | 4456 | "}", |
4465 | 4457 | "", |
4466 | 4458 | "const responseJson = pm.response.json();", |
|
4470 | 4462 | "});", |
4471 | 4463 | "", |
4472 | 4464 | "pm.test(\"Should have correct error response\", () => {", |
4473 | | - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", |
| 4465 | + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", |
4474 | 4466 | "});", |
4475 | 4467 | "", |
4476 | 4468 | "pm.test(\"Should have correct response body\", () => {", |
|
4485 | 4477 | "method": "GET", |
4486 | 4478 | "header": [], |
4487 | 4479 | "url": { |
4488 | | - "raw": "{{api_base_url}}/Consent?performer:identifier=90000000011", |
| 4480 | + "raw": "{{api_base_url}}/Consent?performer:identifier=https://fhir.nhs.uk/Id/nhs-number|1234567890", |
4489 | 4481 | "host": [ |
4490 | 4482 | "{{api_base_url}}" |
4491 | 4483 | ], |
|
4495 | 4487 | "query": [ |
4496 | 4488 | { |
4497 | 4489 | "key": "performer:identifier", |
4498 | | - "value": "90000000011" |
| 4490 | + "value": "https://fhir.nhs.uk/Id/nhs-number|1234567890" |
4499 | 4491 | } |
4500 | 4492 | ] |
4501 | 4493 | } |
|
0 commit comments