add examples for patching to security tag (#4698)
This commit is contained in:
Родитель
5bb52a653a
Коммит
0d9f7a108b
|
@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче