0.4.7 addendum

Additional instructions for update

createdAt (cts)

New column added to all resource tables - cts (createdAt) - time of resource creation. All CRUD operations respect this column, but we do not include automatic migration for this column because of performance reason. To set this column in a right value for existing data you have to run following statements manually on your box:

-- set cts to ts - right value for created resources
update "patient" set cts = ts;
-- take cts for updated resources from history
update "patient" set cts = h.ts
FROM "patient_history" h
WHERE h.id = "patient".id and h.status = 'created';

Replace "patient" and "patient_history" with lowercased name of resource types you want to update.

In API this column will be present as Resource.meta.createdAt in Aidbox Format and as Resource.meta.extension(url: 'ax:createdAt').valueInstant in FHIR.