AZURE FHIR:_lastUpdated 如何转换为 ResourceSurrogateId
AZURE FHIR: How _lastUpdated transformed to ResourceSurrogateId
继续研究 AZURE FHIR(Sql 版本),我发现 lastUpdated 搜索参数以某种方式与 ResourceSurrogateId 字段相关(在资源 table 中)。
此外,我认为两者是相同的,但格式不同。但是,我没有找到任何来源来解释 lastupdated(日期时间值)如何转换为 ResourceSurrogateId(数值)。
有人可以解释一下如何根据原始日期时间值获取 ResourceSurrogateId 吗?
Test:
I run the followig FHIR REST API: https://XXXXXXXXXXX/DeviceComponent?_lastUpdated=gt2019-07-01
and the actual query on the database was:
FROM dbo.Resource r
WHERE ResourceTypeId = @p1
AND ResourceSurrogateId >= @p2
AND IsHistory = 0
AND IsDeleted = 0
ORDER BY r.ResourceSurrogateId ASC
OPTION(RECOMPILE)',N'@p0 int,@p1 smallint,@p2 bigint',@p0=11,@p1=32,@p2=5095809792000000000```
资源代理 ID 将插入的日期时间编码为毫秒精度,以及来自数据库循环序列的 "uniquifier"。从代理 ID 转换为日期时间并返回的代码是 here.
您将无法从日期时间获取代理 ID,但可以获取其下限和上限。
继续研究 AZURE FHIR(Sql 版本),我发现 lastUpdated 搜索参数以某种方式与 ResourceSurrogateId 字段相关(在资源 table 中)。
此外,我认为两者是相同的,但格式不同。但是,我没有找到任何来源来解释 lastupdated(日期时间值)如何转换为 ResourceSurrogateId(数值)。
有人可以解释一下如何根据原始日期时间值获取 ResourceSurrogateId 吗?
Test: I run the followig FHIR REST API:
https://XXXXXXXXXXX/DeviceComponent?_lastUpdated=gt2019-07-01
and the actual query on the database was:
FROM dbo.Resource r
WHERE ResourceTypeId = @p1
AND ResourceSurrogateId >= @p2
AND IsHistory = 0
AND IsDeleted = 0
ORDER BY r.ResourceSurrogateId ASC
OPTION(RECOMPILE)',N'@p0 int,@p1 smallint,@p2 bigint',@p0=11,@p1=32,@p2=5095809792000000000```
资源代理 ID 将插入的日期时间编码为毫秒精度,以及来自数据库循环序列的 "uniquifier"。从代理 ID 转换为日期时间并返回的代码是 here.
您将无法从日期时间获取代理 ID,但可以获取其下限和上限。