@ltht-react/diagnosis-summary 2.0.105 → 2.0.107
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.
|
@@ -37,8 +37,9 @@ var StyledConditionStatus = styled_1.default.div(templateObject_1 || (templateOb
|
|
|
37
37
|
return (enteredInError ? 'line-through' : 'none');
|
|
38
38
|
});
|
|
39
39
|
var extractDataSourceDisplayNames = function (condition) {
|
|
40
|
+
var _a, _b;
|
|
40
41
|
var dataSourceDisplayNames = [];
|
|
41
|
-
condition.metadata.dataSources.forEach(function (dataSource, _) {
|
|
42
|
+
(_b = (_a = condition === null || condition === void 0 ? void 0 : condition.metadata) === null || _a === void 0 ? void 0 : _a.dataSources) === null || _b === void 0 ? void 0 : _b.forEach(function (dataSource, _) {
|
|
42
43
|
if (dataSource === null || dataSource === void 0 ? void 0 : dataSource.display) {
|
|
43
44
|
dataSourceDisplayNames.push(dataSource.display);
|
|
44
45
|
}
|
|
@@ -48,7 +49,7 @@ var extractDataSourceDisplayNames = function (condition) {
|
|
|
48
49
|
var DiagnosisDataSource = function (_a) {
|
|
49
50
|
var condition = _a.condition, enteredInError = _a.enteredInError, rest = __rest(_a, ["condition", "enteredInError"]);
|
|
50
51
|
var dataSourceDisplayNames = extractDataSourceDisplayNames(condition);
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)(StyledConditionStatus, __assign({ enteredInError: enteredInError }, rest, { children: "Source: ".concat(dataSourceDisplayNames) })));
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(StyledConditionStatus, __assign({ enteredInError: enteredInError }, rest, { children: dataSourceDisplayNames ? "Source: ".concat(dataSourceDisplayNames) : "Source: Unknown" })));
|
|
52
53
|
};
|
|
53
54
|
exports.default = DiagnosisDataSource;
|
|
54
55
|
var templateObject_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnosis-data-source.js","sourceRoot":"","sources":["../../src/atoms/diagnosis-data-source.tsx"],"names":[],"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AA;AAC1C,CAAC,CAAA;AAED,IAAM,mBAAmB,GAAc,UAAC,EAAsC;IAApC,IAAA,SAAS,eAAA,EAAE,cAAc,oBAAA,EAAK,IAAI,cAApC,+BAAsC,CAAF;IAC1E,IAAM,sBAAsB,GAAG,6BAA6B,CAAC,SAAS,CAAC,CAAA;IAEvE,OAAO,CACL,uBAAC,qBAAqB,aAAC,cAAc,EAAE,cAAc,IAAM,IAAI,cAC5D,sBAAsB,CAAC,CAAC,CAAC,kBAAW,sBAAsB,CAAE,CAAC,CAAC,CAAC,iBAAiB,IAC3D,CACzB,CAAA;AACH,CAAC,CAAA;AAWD,kBAAe,mBAAmB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ltht-react/diagnosis-summary",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.107",
|
|
4
4
|
"description": "ltht-react clinical DiagnosisSummary component.",
|
|
5
5
|
"author": "LTHT",
|
|
6
6
|
"homepage": "",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@emotion/react": "^11.0.0",
|
|
30
30
|
"@emotion/styled": "^11.0.0",
|
|
31
|
-
"@ltht-react/button": "^2.0.
|
|
32
|
-
"@ltht-react/hooks": "^2.0.
|
|
33
|
-
"@ltht-react/icon": "^2.0.
|
|
34
|
-
"@ltht-react/list": "^2.0.
|
|
35
|
-
"@ltht-react/styles": "^2.0.
|
|
36
|
-
"@ltht-react/type-summary": "^2.0.
|
|
37
|
-
"@ltht-react/types": "^2.0.
|
|
38
|
-
"@ltht-react/utils": "^2.0.
|
|
31
|
+
"@ltht-react/button": "^2.0.107",
|
|
32
|
+
"@ltht-react/hooks": "^2.0.107",
|
|
33
|
+
"@ltht-react/icon": "^2.0.107",
|
|
34
|
+
"@ltht-react/list": "^2.0.107",
|
|
35
|
+
"@ltht-react/styles": "^2.0.107",
|
|
36
|
+
"@ltht-react/type-summary": "^2.0.107",
|
|
37
|
+
"@ltht-react/types": "^2.0.107",
|
|
38
|
+
"@ltht-react/utils": "^2.0.107",
|
|
39
39
|
"react": "^18.2.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "ade77431941d97d48bd4ada019a726f64995d94c"
|
|
42
42
|
}
|
|
@@ -15,7 +15,7 @@ const StyledConditionStatus = styled.div<IStyledDescription>`
|
|
|
15
15
|
const extractDataSourceDisplayNames = (condition: Condition) => {
|
|
16
16
|
const dataSourceDisplayNames: string[] = []
|
|
17
17
|
|
|
18
|
-
condition
|
|
18
|
+
condition?.metadata?.dataSources?.forEach((dataSource, _) => {
|
|
19
19
|
if (dataSource?.display) {
|
|
20
20
|
dataSourceDisplayNames.push(dataSource.display)
|
|
21
21
|
}
|
|
@@ -29,7 +29,7 @@ const DiagnosisDataSource: FC<Props> = ({ condition, enteredInError, ...rest })
|
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<StyledConditionStatus enteredInError={enteredInError} {...rest}>
|
|
32
|
-
{`Source: ${dataSourceDisplayNames}`}
|
|
32
|
+
{dataSourceDisplayNames ? `Source: ${dataSourceDisplayNames}` : `Source: Unknown`}
|
|
33
33
|
</StyledConditionStatus>
|
|
34
34
|
)
|
|
35
35
|
}
|