Appointment lastUpdated timestamp update issue

93 views
Skip to first unread message
Assigned to rlcer...@gmail.com by Fenil....@cerner.com

Mikhail Polatov

unread,
Oct 7, 2021, 9:58:59 PM10/7/21
to Cerner FHIR Developers
Hi,

Any idea why an Appointment resource hasn't changed it's lastUpdated timestamp after booked -> cancelled state transition?

Appointment:
{"version":"1","ts":"2021-10-08 03:09:18 UTC","status":"booked","id":"4835580"}

Cancelling that appointment, X-Request-Id e69b3539ed5b2ee0f7ba754bd89124fbd95ada9027f39f29089ed7b32f71b8b1, got status code 200 back.

Re-queried the same Appointment:

{version":"2","ts":"2021-10-08 03:09:41 UTC"."status":"cancelled","id":"4835580"}

Version has been incremented, the status has changed, but the timestamp had changed in a weird way, not even close to reflect an actual transaction time (2021-10-07T22:09:39Z, or today's 6:09:39pm EST). Not than date is wrong ass well.

Please advise,

Thank you!
-Mikhail
 

Mikhail Polatov

unread,
Oct 8, 2021, 2:23:35 PM10/8/21
to Cerner FHIR Developers
Last sentence should have been:

Note that date is wrong as well.
Transaction date was 10/07 even in UTC, but returned lastUpdated date was 10/08.

Richard Leaf

unread,
Oct 8, 2021, 4:17:34 PM10/8/21
to Cerner FHIR Developers
The timestamp seems to have incremented by 23 seconds. I ran some tests in my local services, and everything seems to be returning as expected.  Can you reproduce? Are you using DSTU2 or R4 for your retrievals ?

Richard Leaf

unread,
Oct 8, 2021, 4:22:53 PM10/8/21
to Cerner FHIR Developers
Additionally, in the table the udpate date time is 2021-10-07 22:09:41 which when converted to UTC would correspond to the same update date time you have on your version 2 retrieval.

Mikhail Polatov

unread,
Oct 8, 2021, 5:40:34 PM10/8/21
to Cerner FHIR Developers
I think you guys have some issues with timestamps.

All this below was done @ 5ish pm EST (21:MM:SS UTC), as you see timestamps below in UTC at the begging of each log line.

Yet your timestamps are coming with the right min/sec, but hours are off by 5 hours - booked @ 211249 UTC - your timesmap came back 2021-10-09T02:12:51Z
Are you re-converting UTC again into UTC (+5h extra) somewhere?

booking

211249.315319Z sent https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment => (POST,data=443,X-Request-ID:e76e13939cc3aebd67e9cbfe12a91d4cb0509a9fa0e6e21421c1213e56e69c2f){"requestedPeriod":[{"end":"2021-10-26T14:30:00.000Z","start":"2021-10-26T14:15:00.000Z"}],"slot":[{"reference":"Slot/24477854-21304876-63652275-75"}],"resourceType":"Appointment","status":"booked","serviceType":[{"coding":[{"system":"https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14249","code":"24477854"}]}],"reasonCode":[{"text":"test"}],"participant":[{"status":"accepted","actor":{"reference":"Patient/12724065"}}]}                                                                                                                                                                                                   

Re-querying

211252.388337Z sent https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment?patient=12724065&date=ge2021-10-26T00:00:00.000Z&date=lt2021-10-26T23:59:59.000Z => (GET,data=0,X-Request-Id:33327c5fd3278d4909e760bb2063044808f45c90d7b0cf42cdb1487e98d5de3d) 

211252.933651Z IN {"meta":{"lastUpdated":"2021-10-09T02:12:51Z","versionId":"1"},"status":"booked","participant":[{"required":"required","actor":{"reference":"Location/21304876","display":"MX Clinic 1"},"status":"accepted"},{"actor":{"reference":"Practitioner/12742614","display":"PWSUKI, MDCARDIO"},"status":"accepted","required":"required","type":[{"coding":[{"code":"0","userSelected":true,"system":"https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14250"}]},{"coding":[{"code":"PPRF","display":"primary performer","system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType"}]}]},{"actor":{"reference":"Patient/12724065","display":"SMART, WILMA"},"status":"accepted","required":"required","type":[{"coding":[{"code":"4572","display":"Patient","userSelected":true,"system":"https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14250"}],"text":"Patient"}]}],"reasonCode":[{"text":"test"}],"serviceType":[{"coding":[{"display":"Established Patient","userSelected":true,"system":"https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14249","code":"24477854"},{"system":"http://snomed.info/sct","userSelected":false,"display":"General medical practice (qualifier value)","code":"408443003"}],"text":"Established Patient"}],"slot":[{"reference":"Slot/24477854-21304876-63652275-75"}],"description":"Established Patient","start":"2021-10-26T14:15:00Z","requestedPeriod":[{"start":"2021-10-26T14:15:00Z","end":"2021-10-26T14:30:00Z"}],"id":"4835625","minutesDuration":15,"resourceType":"Appointment","end":"2021-10-26T14:30:00Z","text":{"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Appointment</b></p><p><b>Status</b>: Booked</p><p><b>Service Type</b>: Established Patient</p><p><b>Start</b>: Oct 26, 2021  2:15 P.M. UTC</p><p><b>End</b>: Oct 26, 2021  2:30 P.M. UTC</p><p><b>Slot Id</b>: 24477854-21304876-63652275-75</p><p><b>Participants</b>:</p><dl><dd><b>Location</b>: MX Clinic 1</dd><dd><b>Practitioner</b>: PWSUKI, MDCARDIO</dd><dd><b>Patient</b>: SMART, WILMA</dd></dl></div>","status":"generated"}}

cancelling

211747.108744Z sent https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4835625 => (PATCH,data=55,X-Request-Id:1ec89b1ab18bbb09acff9407ab3add5ac52cc73ea55a5fe31b34af1a9e5ce91b)[{"path":"/status","value":"cancelled","op":"replace"}] 
211747.669773Z recv https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment/4835625 <= (200,data=0)                                                                                                                                                         


Re-querying appointment

211748.599832Z sent https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment?patient=12724065&date=ge2021-10-26T00:00:00.000Z&date=lt2021-10-26T23:59:59.000Z => (GET,data=0,X-Request-Id:8da529510665204e6e0b6567e8ee3bd054cfff8c7e1d6fa53f05d920fd78c723) 

211749.166286Z IN {"serviceType":[{"text":"Established Patient","coding":[{"code":"24477854","system":"https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14249","userSelected":true,"display":"Established Patient"},{"code":"408443003","userSelected":false,"system":"http://snomed.info/sct","display":"General medical practice (qualifier value)"}]}],"resourceType":"Appointment","minutesDuration":15,"cancelationReason":{"coding":[{"userSelected":true,"system":"https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14229","code":"0"}]},"requestedPeriod":[{"start":"2021-10-26T14:15:00Z","end":"2021-10-26T14:30:00Z"}],"id":"4835625","start":"2021-10-26T14:15:00Z","description":"Established Patient","end":"2021-10-26T14:30:00Z","text":{"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Appointment</b></p><p><b>Status</b>: Cancelled</p><p><b>Service Type</b>: Established Patient</p><p><b>Start</b>: Oct 26, 2021  2:15 P.M. UTC</p><p><b>End</b>: Oct 26, 2021  2:30 P.M. UTC</p><p><b>Participants</b>:</p><dl><dd><b>Location</b>: MX Clinic 1</dd><dd><b>Practitioner</b>: PWSUKI, MDCARDIO</dd><dd><b>Patient</b>: SMART, WILMA</dd></dl></div>","status":"generated"},"status":"cancelled","meta":{"versionId":"2","lastUpdated":"2021-10-09T02:17:47Z"},"reasonCode":[{"text":"test"}],"participant":[{"status":"accepted","actor":{"display":"MX Clinic 1","reference":"Location/21304876"},"required":"required"},{"type":[{"coding":[{"code":"0","system":"https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14250","userSelected":true}]},{"coding":[{"code":"PPRF","display":"primary performer","system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType"}]}],"required":"required","actor":{"display":"PWSUKI, MDCARDIO","reference":"Practitioner/12742614"},"status":"accepted"},{"required":"required","type":[{"text":"Patient","coding":[{"code":"4572","system":"https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14250","userSelected":true,"display":"Patient"}]}],"status":"accepted","actor":{"display":"SMART, WILMA","reference":"Patient/12724065"}}]}                                                                                                              
Thx,
-Mikhail

Richard Leaf

unread,
Oct 11, 2021, 11:28:21 AM10/11/21
to Cerner FHIR Developers
Hi Mikhail - thank you for your investigation here - we're logging an internal investigation to see what is going on and make any corrections.
Reply all
Reply to author
Forward
0 new messages