forked from nightscout/cgm-remote-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelivery-request.schema.json
More file actions
100 lines (100 loc) · 2.96 KB
/
delivery-request.schema.json
File metadata and controls
100 lines (100 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://nightscout.github.io/schemas/delivery-request.schema.json",
"title": "DeliveryRequest",
"description": "Intent to deliver insulin - the command sent to the pump",
"type": "object",
"required": ["requestId", "requestType", "requestedBy", "requestedAt"],
"properties": {
"requestId": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for this delivery request"
},
"requestType": {
"type": "string",
"enum": ["tempBasal", "scheduledBasal", "bolus", "microBolus", "suspend", "resume", "cancelTemp"],
"description": "Type of delivery action requested"
},
"parameters": {
"type": "object",
"description": "Request parameters (varies by requestType)",
"properties": {
"rate": {
"type": "number",
"minimum": 0,
"description": "Rate in U/hr for basal requests"
},
"units": {
"type": "number",
"minimum": 0,
"description": "Units for bolus requests"
},
"duration": {
"type": "integer",
"minimum": 0,
"description": "Duration in seconds for temp basal"
},
"bolusType": {
"type": "string",
"enum": ["normal", "square", "dual", "micro"],
"description": "Type of bolus if applicable"
}
}
},
"requestedBy": {
"type": "object",
"required": ["issuerType", "issuerId"],
"properties": {
"issuerType": {
"type": "string",
"enum": ["human", "controller", "agent", "caregiver"]
},
"issuerId": {
"type": "string"
}
}
},
"basedOn": {
"type": "object",
"description": "What informed this request",
"properties": {
"policyCompositionId": {
"type": "string",
"description": "PolicyComposition that was in force"
},
"algorithmSuggestion": {
"type": "object",
"description": "Algorithm output that led to this request",
"properties": {
"suggestedAt": { "type": "string", "format": "date-time" },
"reason": { "type": "string" },
"predictedBG": {
"type": "array",
"items": { "type": "number" }
},
"iob": { "type": "number" },
"cob": { "type": "number" },
"eventualBG": { "type": "number" }
}
}
}
},
"requestedAt": {
"type": "string",
"format": "date-time",
"description": "When this request was created"
},
"expiresAt": {
"type": "string",
"format": "date-time",
"description": "Request is stale/invalid after this time"
},
"priority": {
"type": "string",
"enum": ["normal", "high", "urgent"],
"default": "normal",
"description": "Request priority for queuing"
}
}
}