0.4.7 addendum

Additional instructions for update

createdAt (cts)

New column added to all resource tables - cts (createdAt) - a time of resource creation. All CRUD operations respect this column, but we do not include automatic migration for this column because of performance reasons. To set this column in the right value for existing data, you have to run the 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 the 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.