Description
Return action age and overdue time against a supplied due day.
Pharmacy administration distinguishes medicine and document identifiers, service records, stock balances and payment conventions from decisions about care. Literal labels and supplied status flags help reconcile records, while medicine identity, appropriate treatment and actual availability require independent verification.
Return action age and overdue time against a supplied due day.
When to use this tool
Use Pharmacy Care Action Owner Due Gap when reconciling the stated pharmacy record, inventory, timing or financial convention.
How to use the tool and how it works
- Enter actionId, ownerId, assignedDay, dueDay, completedDay, completed, today. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read ageDays, overdueDays, completedLate, key. Inspect completedLate before interpreting the associated values.
Return action age and overdue time against a supplied due day. Require assignedDay <= dueDay, today >= assignedDay and completedDay >= assignedDay when completed; use completion day or today, overdue is max(0,effective day-due), completedLate is strict.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| actionId | Action Id | Required. Text; maximum UTF-16 length 8192. |
| ownerId | Owner Id | Required. Text; maximum UTF-16 length 8192. |
| assignedDay | Assigned Day | Required. Safe integer. |
| dueDay | Due Day | Required. Safe integer. |
| completedDay | Completed Day | Required. Safe integer. |
| completed | Completed | Required. Boolean. |
| today | Today | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| ageDays | Effective completion day or today minus assignedDay; a future completion is not compared with today. | Required. Safe integer. |
| overdueDays | Overdue Days | Required. Safe integer. |
| completedLate | Completed Late | Required. Boolean. |
| key | Serialized literal record key; uniqueness or matching does not authenticate the source. | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"actionId": "A1",
"ownerId": "O1",
"assignedDay": 100,
"dueDay": 110,
"completedDay": 112,
"completed": true,
"today": 120
},
"output": {
"ageDays": 12,
"overdueDays": 2,
"completedLate": true,
"key": "[\"A1\",\"O1\"]"
}
} Limitations and assumptions
- A future completedDay is not compared with today; owner labels and completion assertions do not verify care or responsibility.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Inspect verified medicine and service records and the applicable professional procedures; use appropriate clinical systems and qualified professional judgment for care or supply decisions.
References
Similar or alternative tools
- Review Action Closure Delay
Return elapsed and pause-adjusted review closure time.
- Medication Record Date Gap
Return signed elapsed days between two medication-record dates.