Poieti HIS Web Service
附件與送出狀態
下載附件、查詢一筆送出的狀態與核對清單。
本頁內容與 contracts/his v1.0.0 及 Poieti 伺服器實作一致。
附件#
GET
/his/v1/deliveries/{deliveryId}/attachments/{attachmentId}推送的請求只含附件的中繼資料,端點以 deliveries 範圍的機器金鑰、從憑證允許的來源位址在此下載位元組。回傳原始位元組與 Content-Type、Content-Length,已知雜湊時加上 Digest: sha-256=<base64>。只在送出為 leased(POST 進行中,或 202 之後的保留期間)或 written、內容未清除且包含此附件時提供,否則 404 HIS_ATTACHMENT_NOT_FOUND;未知的送出 ID 回 404 DELIVERY_NOT_FOUND。寫入前比對大小與 attachments[].sha256,不符時不要寫入,回可重試的 ATTACHMENT_MISMATCH。
查詢狀態#
GET
/his/v1/deliveries/{deliveryId}200 OK
{
"deliveryId": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
"generation": 1,
"featureId": "wound-record",
"recordId": "8b7a6f5e-4d3c-4b2a-9f1e-0d9c8b7a6f5e",
"recordVersion": 1,
"state": "written",
"kind": "create",
"blockReasons": [],
"hisRecordId": "WD-20261016-0031",
"attempts": 1,
"createdAt": "2026-10-16T01:52:18.204Z",
"updatedAt": "2026-10-16T07:43:02.118Z",
"writtenAt": "2026-10-16T07:43:02.118Z"
}只含中繼資料,不含身分或臨床內容,用來確認一筆送出在 Poieti 的狀態。kind 在首次送出前不存在;leaseExpiresAt、acceptedAt 只在 leased 時出現。blockReasons 只在 blocked 時非空(見錯誤碼)。
核對清單#
GET
/his/v1/deliveries?state=&updatedSince=&after=&limit=200 OK
{
"deliveries": [
{
"deliveryId": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
"generation": 1,
"featureId": "wound-record",
"recordId": "8b7a6f5e-4d3c-4b2a-9f1e-0d9c8b7a6f5e",
"recordVersion": 1,
"state": "written",
"kind": "create",
"blockReasons": [],
"hisRecordId": "WD-20261016-0031",
"attempts": 1,
"createdAt": "2026-10-16T01:52:18.204Z",
"updatedAt": "2026-10-16T07:43:02.118Z",
"writtenAt": "2026-10-16T07:43:02.118Z"
},
{
"deliveryId": "0f6c2a4e-8d1b-4c3a-9e5f-7a1b2c3d4e5f",
"generation": 1,
"featureId": "nursing-admission",
"recordId": "6a1d9c2e-3b4f-4a5d-8e6f-1a2b3c4d5e6f",
"recordVersion": 3,
"state": "leased",
"kind": "correction",
"blockReasons": [],
"attempts": 2,
"leaseExpiresAt": "2026-10-17T07:43:40.020Z",
"acceptedAt": "2026-10-16T07:43:40.020Z",
"createdAt": "2026-10-16T07:42:10.377Z",
"updatedAt": "2026-10-16T07:43:40.020Z"
}
],
"nextAfter": "MTc5MjEzNjYyMDAyMDowZjZjMmE0ZQ"
}| 參數 | 說明 |
|---|---|
state | 單一狀態,例如 written |
updatedSince | RFC 3339(含時區);有 after 時忽略 |
after | 上一頁的 nextAfter |
limit | 1–200,預設 100 |
依 (updatedAt, deliveryId) 遞增排序的鍵集分頁;整頁都有資料時就附 nextAfter(下一頁可能是空的),不滿一頁時為 null。用於定期核對 HIS 是否仍有已寫入的紀錄。未知的查詢參數回 422。