@peopl-health/nexus 5.71.19 → 5.71.20
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.
|
@@ -32,6 +32,8 @@ const VALUE_SEPARATOR = ', ';
|
|
|
32
32
|
const PART_SEPARATOR = '. ';
|
|
33
33
|
const SECTION_SEPARATOR = '\n\n';
|
|
34
34
|
const RETRACTED = new Set(['resolved', 'inactive', 'stopped', 'not-done']);
|
|
35
|
+
// still stored and covering the field, but not rendered as what the patient has now
|
|
36
|
+
const NOT_CURRENT = new Set(['completed', 'not-taking', 'preparation']);
|
|
35
37
|
|
|
36
38
|
const isRetracted = (status) => RETRACTED.has(status);
|
|
37
39
|
|
|
@@ -48,7 +50,8 @@ const preferring = (rows, uninformative) => {
|
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
function renderableValues(bucket) {
|
|
51
|
-
|
|
53
|
+
const current = preferring(bucket, LEGACY_CONCEPT).filter((row) => !NOT_CURRENT.has(row.status));
|
|
54
|
+
return preferring(current, NO_KNOWN_ALLERGY.concept).map((row) => decodePair(row.value));
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
function fieldsFromFhir(rows, patient) {
|
|
@@ -72,6 +72,7 @@ const MEDICATION_ADHERENCE = {
|
|
|
72
72
|
finalizado: 'stopped', end: 'stopped', replaced: 'stopped',
|
|
73
73
|
past: 'stopped', previous: 'stopped', historical: 'stopped', historico: 'stopped',
|
|
74
74
|
'on-hold': 'on-hold', 'en pausa': 'on-hold', paused: 'on-hold',
|
|
75
|
+
planned: 'not-taking', planificado: 'not-taking', programado: 'not-taking',
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
const CONTEXT_RESOURCE_TYPES = [...new Set(Object.values(KIND_TO_RESOURCE_TYPE))];
|