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 request and tests for setting visibility extension #289

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Changes from all commits
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
80 changes: 77 additions & 3 deletions samples/postman/VZD-FHIR-Directory/FHIRDirectoryOwnerAPI.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"info": {
"_postman_id": "f43b7e09-357a-44c8-ad9a-1437f6a43066",
"_postman_id": "5c93d5ae-43c4-40e7-9096-a9dc4dfafa10",
"name": "FHIRDirectoryOwnerAPI",
"description": "In dieser Collection befinden sich 2 Ordner, die Requests enthalten um einen Endpunkt an einem HealtcareService (Ordner \"Organization\") oder an einer PractitionerRole (Ordner \"Organization\") anzulegen, zu aktualisieren und zu löschen. Für die Requests wird ein owner-accesstoken benötigt. Dieses ist für die Requests im Practitioner Ordner in der Variablen practitioner_token und für die Requests im Organization Ordner in der Variablen org_token zu setzen.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "29292558"
"_exporter_id": "40068010"
},
"item": [
{
Expand Down Expand Up @@ -220,7 +220,25 @@
"response": []
},
{
"name": "UpdateEndpointStatus",
"name": "UpdateEndpointStatus (visible)",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"did reset visibility extension\", () => {",
" const extensions = pm.response.json()?.extension;",
" const extension = extensions?.filter(e => e.url === \"https://gematik.de/fhir/directory/StructureDefinition/EndpointVisibility\")?.[0];",
" const code = extension?.valueCoding?.code;",
" pm.expect(code).to.equal(undefined);",
"});",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
Expand Down Expand Up @@ -257,6 +275,62 @@
},
"response": []
},
{
"name": "UpdateEndpointStatus (invisible)",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"did set visibility extension\", () => {",
" const extensions = pm.response.json()?.extension;",
" const extension = extensions?.filter(e => e.url === \"https://gematik.de/fhir/directory/StructureDefinition/EndpointVisibility\")?.[0];",
" const code = extension?.valueCoding?.code;",
" pm.expect(code).to.equal(\"hide-versicherte\");",
"});",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{practitioner_token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"resourceType\": \"Endpoint\",\n \"id\": \"{{endpointID}}\",\n \"meta\": {\n \"profile\": [\n \"https://gematik.de/fhir/directory/StructureDefinition/EndpointDirectory\",\n \"http://hl7.org/fhir/StructureDefinition/Endpoint\"\n ],\n \"tag\": [\n {\n \"system\": \"https://gematik.de/fhir/directory/CodeSystem/Origin\",\n \"code\": \"owner\",\n \"display\": \"my test owner\",\n \"userSelected\": false\n }\n ]\n },\n \"text\": {\n \"status\": \"generated\",\n \"div\": \"This is Sparta!!!\"\n },\n \"status\": \"off\",\n \"connectionType\": {\n \"system\": \"https://gematik.de/fhir/directory/CodeSystem/EndpointDirectoryConnectionType\",\n \"code\": \"tim\"\n },\n \"name\": \"This is Sparta!!!\",\n \"payloadType\": [\n {\n \"coding\": [\n {\n \"system\": \"https://gematik.de/fhir/directory/CodeSystem/EndpointDirectoryPayloadType\",\n \"code\": \"tim-chat\",\n \"display\": \"TI-Messenger chat\"\n }\n ]\n }\n ],\n \"address\": \"@gemtest:gematik.de\",\n \"extension\": [\n {\n \"url\": \"https://gematik.de/fhir/directory/StructureDefinition/EndpointVisibility\",\n \"valueCoding\": [\n {\n \"system\": \"https://gematik.de/fhir/directory/CodeSystem/EndpointVisibilityCS\",\n \"code\": \"hide-versicherte\"\n }\n ]\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{fhir_server}}/owner/Endpoint/{{endpointID}}",
"host": [
"{{fhir_server}}"
],
"path": [
"owner",
"Endpoint",
"{{endpointID}}"
]
}
},
"response": []
},
{
"name": "DeleteEndpoint",
"request": {
Expand Down
Loading