@ovok/core 0.2.57 → 0.2.59

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.
@@ -15,7 +15,7 @@ class BodyTemperatureService extends base_observation_service_1.BaseObservationS
15
15
  display: "Body Temperature",
16
16
  unit: "°C",
17
17
  valueKey: "bodyTemp",
18
- toFixed: 0,
18
+ toFixed: 1,
19
19
  },
20
20
  ];
21
21
  }
@@ -33,10 +33,14 @@ class EcgService extends base_observation_service_1.BaseObservationService {
33
33
  const heartRate = castedMeasurement.heartRate;
34
34
  const diagramPoints = castedMeasurement.diagramPoints;
35
35
  if (diagramPoints === null || diagramPoints === void 0 ? void 0 : diagramPoints.length) {
36
+ const duration = castedMeasurement.duration;
37
+ const period = typeof duration === "number" && Number.isFinite(duration) && duration > 0
38
+ ? (duration * 1000) / diagramPoints.length
39
+ : 1;
36
40
  values.push({
37
41
  valueSampledData: {
38
42
  origin: { value: 0, unit: "mV" },
39
- period: 1,
43
+ period,
40
44
  dimensions: 1,
41
45
  data: diagramPoints.join(" "),
42
46
  },
@@ -76,7 +80,12 @@ class EcgService extends base_observation_service_1.BaseObservationService {
76
80
  ],
77
81
  },
78
82
  id: "measurement-duration",
79
- valueInteger: castedMeasurement.duration,
83
+ valueQuantity: {
84
+ value: castedMeasurement.duration,
85
+ unit: "s",
86
+ code: "s",
87
+ system: "http://unitsofmeasure.org",
88
+ },
80
89
  },
81
90
  ],
82
91
  },
@@ -48,7 +48,7 @@ exports.OVOK_CORE_REQUIREMENTS = {
48
48
  description: "The FHIR surface a server must provide for the @ovok/core client library's own methods to function.",
49
49
  software: {
50
50
  name: "@ovok/core",
51
- version: "0.2.56",
51
+ version: "0.2.58",
52
52
  },
53
53
  fhirVersion: "4.0.1",
54
54
  format: ["json"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/core",
3
- "version": "0.2.57",
3
+ "version": "0.2.59",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",