A precondition requirement was not satisfied - Patient PATCH

83 views
Skip to first unread message

Shankar Ganesh Jayaraman

unread,
Dec 25, 2019, 3:12:48 PM12/25/19
to cerner-fhir...@googlegroups.com
Hi,

I am trying to update the patient record with R4 using Patch method, using the below reference

x-request-id →0da08df21642a861d5c31b08a7fa9a76


Request Header
Authorization:Bearer eyJraWQiOiIyMDE5LTEyLTI1VDAzOjM1OjEwLjE5Ni5lYyIsInR5cCI6IkpXVCIsImFsZyI6IkVTMjU2In0.eyJzdWIiOiJwb3J0YWwiLCJ1cm46Y29tOmNlcm5lcjphdXRob3JpemF0aW9uOmNsYWltcyI6eyJ2ZXIiOiIxLjAiLCJlbmNvdW50ZXIiOiI0NjU3OTA2IiwidG50IjoiMGI4YTAxMTEtZThlNi00YzI2LWE5MWMtNTA2OWNiYzZiMWNhIiwiYXpzIjoibGF1bmNoIG9ubGluZV9hY2Nlc3MgdXNlclwvUGF0aWVudC5yZWFkIHVzZXJcL1BhdGllbnQud3JpdGUgdXNlclwvQWxsZXJneUludG9sZXJhbmNlLnJlYWQgdXNlclwvQWxsZXJneUludG9sZXJhbmNlLndyaXRlIiwidXNlciI6IjQ0NjQwMDciLCJwYXRpZW50IjoiNTk5ODAwNyJ9LCJhenAiOiIyNDI1NjEyZC01YTU5LTRkNTYtODVhNy01MDNkNjVjM2Y5OTkiLCJpc3MiOiJodHRwczpcL1wvYXV0aG9yaXphdGlvbi5zYW5kYm94Y2VybmVyLmNvbVwvIiwiZXhwIjoxNTc3MzA0ODM1LCJpYXQiOjE1NzczMDQyMzUsImp0aSI6IjE2M2NmYzc0LWNjZTEtNDc0OS1hNDhjLTc4N2VlMGEyZTZkZiIsInVybjpjZXJuZXI6YXV0aG9yaXphdGlvbjpjbGFpbXM6dmVyc2lvbjoxIjp7InZlciI6IjEuMCIsInByb2ZpbGVzIjp7Im1pbGxlbm5pdW0tdjEiOnsicGVyc29ubmVsIjoiNDQ2NDAwNyIsImVuY291bnRlciI6IjQ2NTc5MDYifSwic21h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Type:application/json-patch+json
If-Match:W/"25"
Accept:application/fhir+json


Request Body
[
 
{
   
"op": "add",
   
"path": "/identifier/-",
   
"value": {
     
"type": {
       
"coding": [
         
{
           
"code": "MR",
           
"system": "http://hl7.org/fhir/v2/0203"
         
}
       
]
     
},
     
"system": "urn:oid:1.1.1.1.1.1",
     
"value": "THIS:IS:A:UNIQUE:IDENTIFIER",
     
"period": {
       
"start": "2018-01-02T00:00:00-05:00",
       
"end": "2022-01-02T00:00:00-05:00"
     
}
   
}
 
},
 
{
   
"path": "/name/0/id",
   
"op": "test",
   
"value": "CI-5786010-0"
 
},
 
{
   
"path": "/name/0/given",
   
"op": "replace",
   
"value": [
     
"Harrison",
     
"James"
   
]
 
},
 
{
   
"path": "/telecom/0/id",
   
"op": "test",
   
"value": "CI-PH-2807950-0"
 
},
 
{
   
"path": "/telecom/0",
   
"op": "remove"
 
},
 
{
   
"path": "/maritalStatus",
   
"op": "replace",
   
"value": {
     
"coding": [
       
{
         
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
         
"code": "M"
       
}
     
]
   
}
 
},
 
{
   
"path": "/communication",
   
"op": "replace",
   
"value": [
     
{
       
"language": {
         
"coding": [
           
{
             
"system": "https://fhir.cerner.com/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/codeSet/36",
             
"code": "312729"
           
}
         
]
       
},
       
"preferred": true
     
}
   
]
 
},
 
{
   
"path": "/extension",
   
"op": "replace",
   
"value": [
     
{
       
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex",
       
"valueCode": "M"
     
},
     
{
       
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
       
"extension": [
         
{
           
"url": "ombCategory",
           
"valueCoding": {
             
"system": "urn:oid:2.16.840.1.113883.6.238",
             
"code": "2106-3",
             
"display": "White"
           
}
         
},
         
{
           
"url": "detailed",
           
"valueCoding": {
             
"system": "urn:oid:2.16.840.1.113883.6.238",
             
"code": "2110-5",
             
"display": "English"
           
}
         
}
       
]
     
},
     
{
       
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
       
"extension": [
         
{
           
"url": "ombCategory",
           
"valueCoding": {
             
"system": "urn:oid:2.16.840.1.113883.6.238",
             
"code": "2135-2",
             
"display": "Hispanic or Latino"
           
}
         
},
         
{
           
"url": "detailed",
           
"valueCoding": {
             
"system": "urn:oid:2.16.840.1.113883.6.238",
             
"code": "2156-8",
             
"display": "Costa Rican"
           
}
         
}
       
]
     
}
   
]
 
}
]



Response
{
   
"resourceType": "OperationOutcome",
   
"issue": [
       
{
           
"severity": "error",
           
"code": "invalid",
           
"details": {
               
"text": "A precondition requirement was not satisfied"
           
}
       
}
   
]
}


Can anyone help with this? I am not sure where I am missing precondition.
Message has been deleted

Armani Akines (Cerner)

unread,
Dec 26, 2019, 11:05:18 AM12/26/19
to Cerner FHIR Developers
Hello Shankar,

It looks like the precondition that is not being met is your version passed in to the If-Match header. A quick pull of the patient shows a version of '6' (at the time of this reply). I recommend attempting the request again with an If-Match header[1] that is the current version of the Patient Resource.


Thanks,

Armani

Shankar Ganesh Jayaraman

unread,
Dec 27, 2019, 8:30:03 AM12/27/19
to Cerner FHIR Developers
Thanks, Armani! 
I have somehow managed to find the issue and already fixed it. 
But the issue was the Version passed.

Benjamin Eichhorn (Cerner)

unread,
Jan 2, 2020, 9:32:10 AM1/2/20
to Cerner FHIR Developers
Hi,

Friendly reminder, and per our group guidelines. DO NOT post Authorization tokens anywhere in this forum or anywhere else. I would suggest you remove the token from this post.

Thank you,
Ben (Cerner)
Reply all
Reply to author
Forward
0 new messages