@memoarchitect/ontology 0.19.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,7 +25,7 @@ pin an exact release; the package has no repository or runtime dependency on Mem
25
25
  Tools or Memo Architect.
26
26
 
27
27
  ```bash
28
- pnpm add @memoarchitect/ontology@0.19.0
28
+ pnpm add @memoarchitect/ontology@0.20.1
29
29
  ```
30
30
 
31
31
  > **Pre-1.0 notice:** ontology names, relationships, and package layout may
@@ -1197,6 +1197,54 @@ elements:
1197
1197
  "memo_examples_gpca_pump_gpca_formal_behavior::topLevelContract":
1198
1198
  shortId: "CNT-4"
1199
1199
  uuid: "c9422b35-3d90-557d-ba13-b4990f83ab00"
1200
+ "memo_examples_gpca_pump_gpca_interfaces::BolusFrequencySetting":
1201
+ shortId: "FRQ-1"
1202
+ uuid: "9c45d630-a383-51bc-b145-e28c7d0427f8"
1203
+ "memo_examples_gpca_pump_gpca_interfaces::BolusFrequencySetting::constraint1":
1204
+ shortId: "ASS-3"
1205
+ uuid: "5b212252-b849-575f-b8e5-bf557836f795"
1206
+ "memo_examples_gpca_pump_gpca_interfaces::DrugConcentrationSetting":
1207
+ shortId: "MSS-1"
1208
+ uuid: "dd082bac-50ef-5f6c-b373-41557ccb5613"
1209
+ "memo_examples_gpca_pump_gpca_interfaces::DrugConcentrationSetting::constraint1":
1210
+ shortId: "ASS-4"
1211
+ uuid: "cbc196e8-a6d7-5657-98ab-065d1a844b30"
1212
+ "memo_examples_gpca_pump_gpca_interfaces::InfusionDurationSetting":
1213
+ shortId: "DRT-1"
1214
+ uuid: "73b2ae25-1747-5585-84a0-1471bcaf72ad"
1215
+ "memo_examples_gpca_pump_gpca_interfaces::InfusionDurationSetting::constraint1":
1216
+ shortId: "ASS-5"
1217
+ uuid: "fd96be2e-b70f-57be-bfc6-14df66f47ff6"
1218
+ "memo_examples_gpca_pump_gpca_interfaces::InfusionRateSetting":
1219
+ shortId: "VLM-1"
1220
+ uuid: "bca81b5f-8d0a-538e-8ea5-fb1ad48b58d2"
1221
+ "memo_examples_gpca_pump_gpca_interfaces::InfusionRateSetting::constraint1":
1222
+ shortId: "ASS-6"
1223
+ uuid: "284f6120-cf94-5323-a3c4-234eb17b1c1b"
1224
+ "memo_examples_gpca_pump_gpca_interfaces::InfusionVolumeSetting":
1225
+ shortId: "VLM-2"
1226
+ uuid: "bbfc1b9b-0917-5119-b07d-1a4fc168f05c"
1227
+ "memo_examples_gpca_pump_gpca_interfaces::InfusionVolumeSetting::constraint1":
1228
+ shortId: "ASS-7"
1229
+ uuid: "fb067d90-bbea-5f34-bd8e-2ce62799e79c"
1230
+ "memo_examples_gpca_pump_gpca_interfaces::KvoRateSetting":
1231
+ shortId: "VLM-3"
1232
+ uuid: "cae17baf-315a-5a3d-8e72-ace0393c5876"
1233
+ "memo_examples_gpca_pump_gpca_interfaces::KvoRateSetting::constraint1":
1234
+ shortId: "ASS-8"
1235
+ uuid: "ed73c8dd-2bf2-5d33-8935-1f19db345c4f"
1236
+ "memo_examples_gpca_pump_gpca_interfaces::MonitoredBatteryVoltage":
1237
+ shortId: "ELC-1"
1238
+ uuid: "931cad53-86ba-5da6-8d14-fe39e810f7a5"
1239
+ "memo_examples_gpca_pump_gpca_interfaces::MonitoredBatteryVoltage::constraint1":
1240
+ shortId: "ASS-1"
1241
+ uuid: "31e7adfb-0088-57d2-92d6-933fc337c195"
1242
+ "memo_examples_gpca_pump_gpca_interfaces::OcclusionLinePressure":
1243
+ shortId: "PRS-1"
1244
+ uuid: "01e73d4a-6d64-5788-8515-e39410e300da"
1245
+ "memo_examples_gpca_pump_gpca_interfaces::OcclusionLinePressure::constraint1":
1246
+ shortId: "ASS-2"
1247
+ uuid: "501e2141-6786-507b-a164-fb50f952187c"
1200
1248
  "memo_examples_gpca_pump_gpca_interfaces::SensorDataInterface":
1201
1249
  shortId: "DTX-1"
1202
1250
  uuid: "b5216019-53f8-5eb3-aba0-f878fa323e7f"
@@ -184,10 +184,8 @@ package memo_examples_gpca_pump_gpca_behavior_subsystems {
184
184
  item ddPrescription : InterfaceItem {
185
185
  attribute :>> itemKind = InterfaceItemKind::data;
186
186
  @MemoIdentity { :>> providedId = "DD-001"; :>> label = "Prescription record"; }
187
- attribute :>> semantics = "patient id, drug name, concentration, VTBI total, duration total, basal flow rate, square bolus rate/duration/interval, patient bolus rate/duration/lockout period, max boluses per hour (DD-005..DD-017)";
187
+ attribute :>> semantics = "patient id, drug name, concentration, VTBI total, duration total, basal flow rate, square bolus rate/duration/interval, patient bolus rate/duration/lockout period, max boluses per hour (DD-005..DD-017) Each value is bounded by the pharmacy database's safe values, lo_hd to hi_hd.";
188
188
  attribute :>> unit = "ml/hr, ml, minutes, mg/ml, per hour";
189
- attribute :>> minValue = "pharmacy-database safe-value lower bounds (lo_hd)";
190
- attribute :>> maxValue = "pharmacy-database safe-value upper bounds (hi_hd)";
191
189
  attribute :>> encoding = "checksummed persistent record";
192
190
  attribute :>> timestampRequired = true;
193
191
  attribute :>> integrityClass = "class C";
@@ -82,6 +82,33 @@ package memo_examples_gpca_pump_gpca_interfaces {
82
82
  attribute :>> nominalVoltageV = 3.3 [V];
83
83
  attribute :>> nominalCurrentA = 0.001 [A];
84
84
  }
85
+ attribute def OcclusionLinePressure :> PressureValue {
86
+ assert constraint { self >= 0 [Pa] and self <= 206843 [Pa] }
87
+ }
88
+ attribute def MonitoredBatteryVoltage :> ElectricPotentialDifferenceValue {
89
+ assert constraint { self >= 9.0 [V] and self <= 12.6 [V] }
90
+ }
91
+ // The ranges the data dictionary gives programmed values, each on the quantity it limits.
92
+ attribute def DrugConcentrationSetting :> MassConcentrationValue {
93
+ // kg/m^3 is numerically the mg/ml a prescription states.
94
+ assert constraint { self >= 0 [kg/m^3] and self <= 999 [kg/m^3] }
95
+ }
96
+ attribute def InfusionRateSetting :> VolumeFlowRateValue {
97
+ assert constraint { self >= 0 [mL/h] and self <= 999 [mL/h] }
98
+ }
99
+ attribute def KvoRateSetting :> VolumeFlowRateValue {
100
+ assert constraint { self >= 0 [mL/h] and self <= 5 [mL/h] }
101
+ }
102
+ attribute def InfusionVolumeSetting :> VolumeValue {
103
+ assert constraint { self >= 0 [mL] and self <= 999 [mL] }
104
+ }
105
+ attribute def InfusionDurationSetting :> DurationValue {
106
+ assert constraint { self >= 0 [min] and self <= 999 [min] }
107
+ }
108
+ attribute def BolusFrequencySetting :> FrequencyValue {
109
+ assert constraint { self >= 0 [1/h] and self <= 999 [1/h] }
110
+ }
111
+
85
112
  interface occlusionAnalogLine : PhysicalInterface connect occlusionSensor.portOcclusionOut to portSensorHarness {
86
113
  @MemoIdentity { :>> providedId = "PI-004"; :>> label = "Occlusion pressure analog line"; }
87
114
  attribute :>> interfaceKind = InterfaceKind::analogSignal;
@@ -91,7 +118,8 @@ package memo_examples_gpca_pump_gpca_interfaces {
91
118
  attribute :>> electricalStandard = "ratiometric 0.5-4.5V";
92
119
  attribute :>> nominalVoltageV = 5 [V];
93
120
  attribute :>> nominalCurrentA = 0.01 [A];
94
- attribute :>> signalRange = "0 to 30 psi line pressure";
121
+ // 0 to 30 psi line pressure.
122
+ attribute linePressure : OcclusionLinePressure;
95
123
  }
96
124
  abstract interface batteryMonitorLine : PhysicalInterface {
97
125
  @MemoIdentity { :>> providedId = "PI-005"; :>> label = "Battery voltage monitor line"; }
@@ -102,7 +130,8 @@ package memo_examples_gpca_pump_gpca_interfaces {
102
130
  attribute :>> electricalStandard = "divided battery rail to ADC";
103
131
  attribute :>> nominalVoltageV = 12 [V];
104
132
  attribute :>> nominalCurrentA = 0.001 [A];
105
- attribute :>> signalRange = "9.0V (depleted) to 12.6V (full)";
133
+ // Depleted at the low end, full at the high end.
134
+ attribute batteryVoltage : MonitoredBatteryVoltage;
106
135
  }
107
136
 
108
137
  // ── System-level interfaces (CriSys Ch.3, I 1-I 11) ─────────
@@ -177,8 +206,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
177
206
  doc /* Concentration of the drug in the solution prescribed for infusion. */
178
207
  attribute :>> semantics = "Must be between DrugConcentration_lo_hd and DrugConcentration_hi_hd for DrugName_prog in the hospital database.";
179
208
  attribute :>> unit = "mg/ml";
180
- attribute :>> minValue = "0";
181
- attribute :>> maxValue = "999";
209
+ attribute quantity : DrugConcentrationSetting;
182
210
  attribute :>> encoding = "Positive Integer";
183
211
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
184
212
  }
@@ -188,8 +216,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
188
216
  doc /* Maximum total volume of the drug solution that can be infused for the prescription. */
189
217
  attribute :>> semantics = "Must be between VTBI_lo_hd and VTBI_hi_hd for DrugName_prog in the hospital database.";
190
218
  attribute :>> unit = "ml/hr";
191
- attribute :>> minValue = "0";
192
- attribute :>> maxValue = "999";
219
+ attribute quantity : InfusionRateSetting;
193
220
  attribute :>> encoding = "Positive Integer";
194
221
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
195
222
  }
@@ -199,8 +226,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
199
226
  doc /* Prescribed total duration of drug infusion across all delivery modes (BASAL, SQUARE BOLUS, PATIENT BOLUS). */
200
227
  attribute :>> semantics = "Cannot be empty; should be >= 0.";
201
228
  attribute :>> unit = "minutes";
202
- attribute :>> minValue = "0";
203
- attribute :>> maxValue = "999";
229
+ attribute quantity : InfusionDurationSetting;
204
230
  attribute :>> encoding = "Time";
205
231
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
206
232
  }
@@ -210,8 +236,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
210
236
  doc /* Prescribed rate of flow of drug during BASAL delivery mode; default FlowRate_lo_hd. */
211
237
  attribute :>> semantics = "Between FlowRate_lo_hd and FlowRate_hi_hd for DrugName_prog; should be < VTBI_total_prog / Duration_total_prog.";
212
238
  attribute :>> unit = "ml/hr";
213
- attribute :>> minValue = "0";
214
- attribute :>> maxValue = "999";
239
+ attribute quantity : InfusionRateSetting;
215
240
  attribute :>> encoding = "Positive Integer";
216
241
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
217
242
  }
@@ -221,8 +246,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
221
246
  doc /* Prescribed flow rate of drug during SQUARE bolus delivery. */
222
247
  attribute :>> semantics = ">= 0; if Duration_sbolus_prog or Interval_sbolus_prog > 0, must be between FlowRate_lo_hd and FlowRate_hi_hd.";
223
248
  attribute :>> unit = "ml/hr";
224
- attribute :>> minValue = "0";
225
- attribute :>> maxValue = "999";
249
+ attribute quantity : InfusionRateSetting;
226
250
  attribute :>> encoding = "Positive Integer";
227
251
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
228
252
  }
@@ -232,8 +256,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
232
256
  doc /* Maximum duration of a single uninterrupted square bolus delivery. */
233
257
  attribute :>> semantics = ">= 0; if FlowRate_sbolus_prog or Interval_sbolus_prog > 0, must be < Interval_sbolus_prog and Duration_total_prog.";
234
258
  attribute :>> unit = "minutes";
235
- attribute :>> minValue = "0";
236
- attribute :>> maxValue = "999";
259
+ attribute quantity : InfusionDurationSetting;
237
260
  attribute :>> encoding = "Time";
238
261
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
239
262
  }
@@ -243,8 +266,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
243
266
  doc /* Minimum interval between two consecutive square bolus initiations; the first square bolus starts Interval_sbolus_prog minutes after infusion initiation. */
244
267
  attribute :>> semantics = ">= 0; if FlowRate_sbolus_prog or Duration_sbolus_prog > 0, must be > Duration_sbolus_prog.";
245
268
  attribute :>> unit = "minutes";
246
- attribute :>> minValue = "0";
247
- attribute :>> maxValue = "999";
269
+ attribute quantity : InfusionDurationSetting;
248
270
  attribute :>> encoding = "Positive Integer";
249
271
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
250
272
  }
@@ -254,8 +276,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
254
276
  doc /* Prescribed flow rate of drug during patient bolus delivery. */
255
277
  attribute :>> semantics = ">= 0; if Duration_pbolus_prog or LockOutPeriod_pbolus_prog > 0, must be between FlowRate_lo_hd and FlowRate_hi_hd.";
256
278
  attribute :>> unit = "ml/hr";
257
- attribute :>> minValue = "0";
258
- attribute :>> maxValue = "999";
279
+ attribute quantity : InfusionRateSetting;
259
280
  attribute :>> encoding = "Positive Integer";
260
281
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
261
282
  }
@@ -265,8 +286,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
265
286
  doc /* Maximum duration of a single uninterrupted patient bolus delivery. */
266
287
  attribute :>> semantics = ">= 0; if FlowRate_pbolus_prog or LockOutPeriod_pbolus_prog > 0, must be < LockOutPeriod_pbolus_prog and Duration_total_prog.";
267
288
  attribute :>> unit = "minutes";
268
- attribute :>> minValue = "0";
269
- attribute :>> maxValue = "999";
289
+ attribute quantity : InfusionDurationSetting;
270
290
  attribute :>> encoding = "Time";
271
291
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
272
292
  }
@@ -276,8 +296,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
276
296
  doc /* Minimum interval between two consecutive patient bolus initiations (the lockout period), irrespective of interruption or completion. */
277
297
  attribute :>> semantics = ">= 0; if FlowRate_pbolus_prog or Duration_pbolus_prog > 0, must be > Duration_pbolus_prog.";
278
298
  attribute :>> unit = "minutes";
279
- attribute :>> minValue = "0";
280
- attribute :>> maxValue = "999";
299
+ attribute quantity : InfusionDurationSetting;
281
300
  attribute :>> encoding = "Positive Integer";
282
301
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
283
302
  }
@@ -287,8 +306,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
287
306
  doc /* Maximum total number of patient boluses that may be initiated during Duration_total_prog. */
288
307
  attribute :>> semantics = ">= 0; must be <= NumberMax_pbolus_hd for DrugName_prog in the hospital database.";
289
308
  attribute :>> unit = "per hour";
290
- attribute :>> minValue = "0";
291
- attribute :>> maxValue = "999";
309
+ attribute quantity : BolusFrequencySetting;
292
310
  attribute :>> encoding = "Positive Integer";
293
311
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.1 Prescription Data"; }
294
312
  }
@@ -379,8 +397,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
379
397
  doc /* Initial volume of drug in the reservoir at the time of entering the prescription; read from the reservoir label. */
380
398
  attribute :>> semantics = "Mandatory; shall be >= X ml (threshold left unspecified in the source draft).";
381
399
  attribute :>> unit = "ml";
382
- attribute :>> minValue = "0";
383
- attribute :>> maxValue = "999";
400
+ attribute quantity : InfusionVolumeSetting;
384
401
  attribute :>> encoding = "Positive Integer";
385
402
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.1.3 Drug Reservoir Data"; }
386
403
  }
@@ -399,8 +416,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
399
416
  doc /* Flow rate of the drug through the hose delivering the drug, measured every X seconds when the system is in ON mode. */
400
417
  attribute :>> semantics = "None stated.";
401
418
  attribute :>> unit = "ml/hr";
402
- attribute :>> minValue = "0";
403
- attribute :>> maxValue = "999";
419
+ attribute quantity : InfusionRateSetting;
404
420
  attribute :>> encoding = "Positive Integer";
405
421
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.3 Drug Flow Interface"; }
406
422
  }
@@ -437,8 +453,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
437
453
  doc /* Maximum concentration of the drug in a solution that can safely be used for infusion for DrugName_hd. */
438
454
  attribute :>> semantics = "None stated.";
439
455
  attribute :>> unit = "mg/ml";
440
- attribute :>> minValue = "0";
441
- attribute :>> maxValue = "999";
456
+ attribute quantity : DrugConcentrationSetting;
442
457
  attribute :>> encoding = "Positive Integer";
443
458
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
444
459
  }
@@ -448,8 +463,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
448
463
  doc /* Minimum concentration of the drug in a solution that can safely be used for infusion for DrugName_hd. */
449
464
  attribute :>> semantics = "None stated.";
450
465
  attribute :>> unit = "mg/ml";
451
- attribute :>> minValue = "0";
452
- attribute :>> maxValue = "999";
466
+ attribute quantity : DrugConcentrationSetting;
453
467
  attribute :>> encoding = "Positive Integer";
454
468
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
455
469
  }
@@ -459,8 +473,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
459
473
  doc /* Maximum volume of drug that is safe to be infused for DrugName_hd. */
460
474
  attribute :>> semantics = "None stated.";
461
475
  attribute :>> unit = "ml/hr";
462
- attribute :>> minValue = "0";
463
- attribute :>> maxValue = "999";
476
+ attribute quantity : InfusionRateSetting;
464
477
  attribute :>> encoding = "Positive Integer";
465
478
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
466
479
  }
@@ -470,8 +483,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
470
483
  doc /* Minimum volume of drug that is safe to be infused for DrugName_hd. */
471
484
  attribute :>> semantics = "Mandatory.";
472
485
  attribute :>> unit = "ml/hr";
473
- attribute :>> minValue = "0";
474
- attribute :>> maxValue = "999";
486
+ attribute quantity : InfusionRateSetting;
475
487
  attribute :>> encoding = "Positive Integer";
476
488
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
477
489
  }
@@ -481,8 +493,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
481
493
  doc /* Maximum safe flow rate of the drug for DrugName_hd. */
482
494
  attribute :>> semantics = "Mandatory.";
483
495
  attribute :>> unit = "ml/hr";
484
- attribute :>> minValue = "0";
485
- attribute :>> maxValue = "999";
496
+ attribute quantity : InfusionRateSetting;
486
497
  attribute :>> encoding = "Positive Integer";
487
498
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
488
499
  }
@@ -492,8 +503,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
492
503
  doc /* Minimum safe flow rate of the drug for DrugName_hd. */
493
504
  attribute :>> semantics = "Mandatory.";
494
505
  attribute :>> unit = "ml/hr";
495
- attribute :>> minValue = "0";
496
- attribute :>> maxValue = "999";
506
+ attribute quantity : InfusionRateSetting;
497
507
  attribute :>> encoding = "Positive Integer";
498
508
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
499
509
  }
@@ -503,8 +513,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
503
513
  doc /* Minimum safe interval between two consecutive patient bolus initiations for DrugName_hd. */
504
514
  attribute :>> semantics = "Mandatory.";
505
515
  attribute :>> unit = "minutes";
506
- attribute :>> minValue = "0";
507
- attribute :>> maxValue = "999";
516
+ attribute quantity : InfusionDurationSetting;
508
517
  attribute :>> encoding = "Positive Integer";
509
518
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
510
519
  }
@@ -514,8 +523,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
514
523
  doc /* Maximum number of patient bolus initiations safe to be self-administered for DrugName_hd. */
515
524
  attribute :>> semantics = "Mandatory.";
516
525
  attribute :>> unit = "per hr";
517
- attribute :>> minValue = "0";
518
- attribute :>> maxValue = "999";
526
+ attribute quantity : BolusFrequencySetting;
519
527
  attribute :>> encoding = "Positive Integer";
520
528
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
521
529
  }
@@ -525,8 +533,7 @@ package memo_examples_gpca_pump_gpca_interfaces {
525
533
  doc /* Minimum flow rate of DrugName_hd that should be maintained to keep the vein open (KVO); default 0.1. */
526
534
  attribute :>> semantics = "Mandatory.";
527
535
  attribute :>> unit = "ml/hr";
528
- attribute :>> minValue = "0";
529
- attribute :>> maxValue = "5";
536
+ attribute quantity : KvoRateSetting;
530
537
  attribute :>> encoding = "Positive Integer";
531
538
  @MemoIdentity { :>> sourceReference = "CITE-001: CriSys GPCA System Requirements (2013), §3.5 Hospital Pharmacy Database Interface"; }
532
539
  }
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/extension-aadl'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: AADL (SAE AS5506) correspondence profile and runtime component families
12
12
  license: MIT
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/extension-anatomy'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: Human anatomy from the Foundational Model of Anatomy (FMA), selected per project
12
12
  license: MIT AND CC-BY-4.0
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/example-extension-clinical'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: Example methodology extension for clinical-procedure vocabulary
12
12
  license: MIT
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/extension-cloud'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: Networked services and managed data stores
12
12
  license: MIT
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/extension-container'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: OCI container images and container runtimes as deployment content
12
12
  license: MIT
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/extension-messaging'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: Publish/subscribe messaging — topics, brokers, and delivery semantics
12
12
  license: MIT
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/extension-ros'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: ROS 2 nodes, messages, topic/service/action interfaces, QoS, and containerized deployment
12
12
  license: MIT
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/methodology-default'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: "MEMO default medical-device methodology \u2014 selects viewpoints/views/DHF documents from @memoarchitect/ontology and adds rules, gates, patterns, profiles, and workflow."
12
12
  license: MIT
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/methodology-gpca'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: "GPCA infusion pump methodology \u2014 subtraction-based tailoring of @memoarchitect/methodology-default for the non-networked prototype variant. Excludes cybersecurity and SOUP."
12
12
  license: MIT
13
13
  tags:
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/ontology'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: "MEMO \u2014 the single canonical medical-device ontology: core semantics, the Arcadia-inspired architecture layers (context, requirements, behavior, structure, interfaces, risk, cybersecurity,\
12
12
  \ assurance, \u2026), compliance, viewpoints, views, and invariant rules. One namespace (memo::), one src/ tree."
13
13
  license: MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memoarchitect/ontology",
3
- "version": "0.19.0",
3
+ "version": "0.20.1",
4
4
  "packageManager": "pnpm@9.15.0",
5
5
  "description": "MEMO — Medical Engineering Modelling Ontology. Pure SysML v2 medical-device ontology with native constraints, portable to any conformant SysML v2 tool (SysIDE, SysON, sysand).",
6
6
  "scripts": {
@@ -7,7 +7,7 @@
7
7
  # (`type`, `extends`, `usage`, `ontologies`, `methodology`, `modules`) were
8
8
  # removed at the native semantic flip and are now rejected if present.
9
9
  name: '@memoarchitect/medical-modeling-profile'
10
- version: 0.19.0
10
+ version: 0.20.1
11
11
  description: Closure rules and viewpoints for medical device modeling
12
12
  license: MIT
13
13
  tags:
@@ -94,15 +94,15 @@ package memo_architecture_realization_physical {
94
94
  // allocate cnMotorDrive to motorHarness;
95
95
  interface def PhysicalInterface specializes Interface {
96
96
  // analog, digital, discrete, pulse or power transfer. Fill in the
97
- // descriptors that kind needs: a range for analog, a bit rate and
98
- // protocol for digital, a frequency for pulse.
97
+ // descriptors that kind needs: a bit rate and protocol for digital,
98
+ // a frequency for pulse. An analog signal's range is a constraint on
99
+ // the type of the attribute that holds it, as every range is.
99
100
  attribute signalingKind : SignalingKind;
100
101
  attribute mediumKind : PhysicalMediumKind;
101
102
  attribute electricalStandard : String;
102
103
  attribute nominalVoltageV : ElectricPotentialDifferenceValue[0..1];
103
104
  attribute nominalCurrentA : ElectricCurrentValue[0..1];
104
- attribute bitRateBps : String;
105
- attribute signalRange : String;
105
+ attribute bitRateBps : BinaryDigitRateValue[0..1];
106
106
  attribute connectorStandard : String;
107
107
  end sourcePort : PhysicalPort;
108
108
  end targetPort : PhysicalPort;
@@ -114,8 +114,6 @@ package memo_architecture_realization_physical {
114
114
  attribute quantity : String;
115
115
  attribute unit : String;
116
116
  attribute nominalValue : String;
117
- attribute minValue : String;
118
- attribute maxValue : String;
119
117
  }
120
118
 
121
119
  // The concrete flow a model types its physical flows by; a concrete `flow def` declares its two ends.
@@ -220,9 +220,8 @@ package memo_core_common {
220
220
  // is not a regulated data item — an IVD result is "5.5 mg/dL, LOINC
221
221
  // 2345-7", not "5.5".
222
222
  attribute semantics : String;
223
+ // A range is not a field here: it is a constraint on the type of the attribute holding the value.
223
224
  attribute unit : String;
224
- attribute minValue : String;
225
- attribute maxValue : String;
226
225
  attribute encoding : String;
227
226
  attribute timestampRequired : Boolean;
228
227
  attribute codes : TerminologyCode[0..*];
@@ -15,7 +15,7 @@ package memo_methodology_profiles {
15
15
  private import memo_core_common::*;
16
16
  part mdCoreLibrary : MethodologyLibrary {
17
17
  @MemoIdentity { :>> providedId = "METHLIB-001"; :>> label = "MedicalDeviceMethodologyLibrary"; }
18
- attribute :>> version = "0.19.0";
18
+ attribute :>> version = "0.20.1";
19
19
  attribute :>> domain = "medical device modeling";
20
20
  doc /* Methodology layer for selecting, restricting, sequencing, tailoring, and lightly extending use of the medical-device ontology. */
21
21
  }
@@ -36,7 +36,7 @@ package memo_methodology_profiles {
36
36
  // second scope authority.
37
37
  part mdDefaultDefinition : MethodologyDefinition {
38
38
  @MemoIdentity { :>> providedId = "METH-MD-DEFAULT"; :>> label = "MedicalDeviceDefault"; }
39
- attribute :>> version = "0.19.0";
39
+ attribute :>> version = "0.20.1";
40
40
  attribute :>> domain = "medical device modeling";
41
41
  doc /* MEMO default medical-device methodology. Selects every layer, discipline, standard, artifact kind, and viewpoint the resolved ontology and extension packages provide. */
42
42
  attribute :>> scopeMode = ScopeModeKind::allAvailable;
@@ -558,6 +558,25 @@ package memo_rules_ontology {
558
558
  constraint { true }
559
559
  }
560
560
 
561
+ // A functional exchange moves something between two functions. This asks
562
+ // that both ends sit in some behaviour: performed by an action or contained
563
+ // in one. It is weaker than "a scenario walks it", which the model cannot
564
+ // tell apart from a function nested in another function.
565
+ //
566
+ // `warning` and `assurance`: a method that models the exchanges first and
567
+ // the scenarios later tailors it.
568
+ constraint def ExchangeEndsInBehaviourRule :> MemoConsistencyRule {
569
+ @MemoIdentity { :>> providedId = "CR-ONT-104"; }
570
+ attribute tailoring = RuleTailoringKind::assurance;
571
+ attribute domain = RuleDomainKind::modelling;
572
+ attribute obligation = RuleObligationKind::recommended;
573
+ attribute appliesTo = "FunctionalExchange";
574
+ attribute severity = RuleSeverityKind::warning;
575
+ attribute rationaleText = "Both ends of a functional exchange should be in a behaviour. An exchange with an end that no action performs or contains cannot be reached by walking one.";
576
+ attribute predicateExpression = "sourceEnd->forAll(upstream(performs)->exists(construct == 'action') or upstream(composes)->exists(construct == 'action')) and targetEnd->forAll(upstream(performs)->exists(construct == 'action') or upstream(composes)->exists(construct == 'action'))";
577
+ constraint { true }
578
+ }
579
+
561
580
  // The predicate here named three features that do not exist — `variantKind`,
562
581
  // `baseScenario`, `variationPoint` — so it could never fail, and a rule that
563
582
  // cannot fail is coverage on paper only. `baseScenario` is the one the