add examples for patching to security tag (#4698)

This commit is contained in:
Mikael Weaver 2024-10-24 21:54:50 +00:00 коммит произвёл GitHub
Родитель 5bb52a653a
Коммит 0d9f7a108b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 99 добавлений и 1 удалений

Просмотреть файл

@ -337,4 +337,65 @@ Authorization: Bearer {{bearer.response.body.access_token}}
]
}
]
}
### Add a security tag. This will always add the elements to the end of the array if the array exists or not.
PATCH https://{{hostname}}/Patient/{{patient.response.body.id}}
content-type: application/fhir+json
Authorization: Bearer {{bearer.response.body.access_token}}
{
"resourceType": "Parameters",
"parameter": [
{
"name": "operation",
"part": [
{
"name": "type",
"valueCode": "add"
},
{
"name": "path",
"valueString": "Patient.meta"
},
{
"name": "name",
"valueString": "security"
},
{
"name": "value",
"valueCoding": {
"system": "http://example.org/security-system",
"code": "SECURITY_TAG_CODE",
"display": "New Security Tag Display"
}
}
]
},
{
"name": "operation",
"part": [
{
"name": "type",
"valueCode": "add"
},
{
"name": "path",
"valueString": "Patient.meta"
},
{
"name": "name",
"valueString": "security"
},
{
"name": "value",
"valueCoding": {
"system": "http://example.org/security-system",
"code": "NEW_SECURITY_TAG_CODE",
"display": "New Security Tag Display"
}
}
]
}
]
}

Просмотреть файл

@ -186,7 +186,7 @@ Authorization: Bearer {{bearer.response.body.access_token}}
}
### Conditional Patch
PATCH {{fhirurl}}/Patient?identifier=1032704
PATCH {{hostname}}/Patient?identifier=1032704
content-type: application/json-patch+json
Authorization: Bearer {{bearer.response.body.access_token}}
@ -202,3 +202,40 @@ Authorization: Bearer {{bearer.response.body.access_token}}
}
}
]
### Add a security tag. Replaces entire array if it exists
PATCH https://{{hostname}}/Patient/{{patient.response.body.id}}
content-type: application/json-patch+json
Authorization: Bearer {{bearer.response.body.access_token}}
[
{
"op": "add",
"path": "/meta/security",
"value": [
{
"system": "http://example.org/security-system",
"code": "SECURITY_TAG_CODE",
"display": "Security Tag Display"
}
]
}
]
### Add a security tag. Array must already exist.
# You cannot use JSON patch to add when you don't know if the array exists. Use FHIR Patch in this scenario.
PATCH https://{{hostname}}/Patient/{{patient.response.body.id}}
content-type: application/json-patch+json
Authorization: Bearer {{bearer.response.body.access_token}}
[
{
"op": "add",
"path": "/meta/security/-",
"value": {
"system": "http://example.org/security-system",
"code": "NEW_SECURITY_TAG_CODE",
"display": "New Security Tag Display"
}
}
]