@ltht-react/diagnosis-summary 2.0.92 → 2.0.94
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 +22 -22
- package/package.json +10 -10
- package/src/atoms/diagnosis-category.tsx +31 -31
- package/src/atoms/diagnosis-onset-estimated.tsx +39 -39
- package/src/atoms/diagnosis-status.tsx +38 -38
- package/src/atoms/diagnosis-title.tsx +28 -37
- package/src/constants.ts +3 -3
- package/src/index.tsx +3 -3
- package/src/molecules/diagnosis-redacted.tsx +31 -31
- package/src/organisms/diagnosis-summary.tsx +166 -168
- package/lib/atoms/diagnosis-category.d.ts +0 -8
- package/lib/atoms/diagnosis-category.js +0 -46
- package/lib/atoms/diagnosis-category.js.map +0 -1
- package/lib/atoms/diagnosis-onset-estimated.d.ts +0 -8
- package/lib/atoms/diagnosis-onset-estimated.js +0 -47
- package/lib/atoms/diagnosis-onset-estimated.js.map +0 -1
- package/lib/atoms/diagnosis-status.d.ts +0 -8
- package/lib/atoms/diagnosis-status.js +0 -51
- package/lib/atoms/diagnosis-status.js.map +0 -1
- package/lib/atoms/diagnosis-sub-header.d.ts +0 -7
- package/lib/atoms/diagnosis-sub-header.js +0 -45
- package/lib/atoms/diagnosis-sub-header.js.map +0 -1
- package/lib/atoms/diagnosis-title.d.ts +0 -8
- package/lib/atoms/diagnosis-title.js +0 -51
- package/lib/atoms/diagnosis-title.js.map +0 -1
- package/lib/constants.d.ts +0 -2
- package/lib/constants.js +0 -5
- package/lib/constants.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -8
- package/lib/index.js.map +0 -1
- package/lib/molecules/diagnosis-redacted.d.ts +0 -7
- package/lib/molecules/diagnosis-redacted.js +0 -22
- package/lib/molecules/diagnosis-redacted.js.map +0 -1
- package/lib/organisms/diagnosis-summary.d.ts +0 -15
- package/lib/organisms/diagnosis-summary.js +0 -65
- package/lib/organisms/diagnosis-summary.js.map +0 -1
- package/src/atoms/diagnosis-sub-header.tsx +0 -29
|
@@ -1,168 +1,166 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react'
|
|
2
|
-
import styled from '@emotion/styled'
|
|
3
|
-
|
|
4
|
-
import { Condition, ConditionVerificationStatus } from '@ltht-react/types'
|
|
5
|
-
import { DateSummary } from '@ltht-react/type-summary'
|
|
6
|
-
import Icon from '@ltht-react/icon'
|
|
7
|
-
import { Button, ButtonProps } from '@ltht-react/button'
|
|
8
|
-
|
|
9
|
-
import { BTN_COLOURS, MOBILE_MAXIMUM_MEDIA_QUERY, SMALL_SCREEN_MAXIMUM_MEDIA_QUERY } from '@ltht-react/styles'
|
|
10
|
-
import Title from '../atoms/diagnosis-title'
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
flex-
|
|
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
|
-
width:
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
export default DiagnosisSummary
|
|
1
|
+
import { FC, HTMLAttributes } from 'react'
|
|
2
|
+
import styled from '@emotion/styled'
|
|
3
|
+
|
|
4
|
+
import { Condition, ConditionVerificationStatus } from '@ltht-react/types'
|
|
5
|
+
import { DateSummary } from '@ltht-react/type-summary'
|
|
6
|
+
import Icon from '@ltht-react/icon'
|
|
7
|
+
import { Button, ButtonProps } from '@ltht-react/button'
|
|
8
|
+
|
|
9
|
+
import { BTN_COLOURS, MOBILE_MAXIMUM_MEDIA_QUERY, SMALL_SCREEN_MAXIMUM_MEDIA_QUERY } from '@ltht-react/styles'
|
|
10
|
+
import Title from '../atoms/diagnosis-title'
|
|
11
|
+
import OnsetDateEstimated from '../atoms/diagnosis-onset-estimated'
|
|
12
|
+
import Redacted from '../molecules/diagnosis-redacted'
|
|
13
|
+
import SNIPPET_HOVER_TEXT from '../constants'
|
|
14
|
+
|
|
15
|
+
const StyledTitle = styled.div`
|
|
16
|
+
display: inline-block;
|
|
17
|
+
`
|
|
18
|
+
const StyledSummary = styled.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
`
|
|
22
|
+
const StyledDescription = styled.div`
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
`
|
|
25
|
+
const StyledLeftContainer = styled.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-grow: 1;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
|
|
30
|
+
${MOBILE_MAXIMUM_MEDIA_QUERY} {
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
}
|
|
33
|
+
`
|
|
34
|
+
const StyledControlsContainer = styled.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
margin: auto 10px auto 10px;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
|
|
39
|
+
${MOBILE_MAXIMUM_MEDIA_QUERY} {
|
|
40
|
+
margin: 10px 0 0 0;
|
|
41
|
+
flex-flow: row wrap;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
${SMALL_SCREEN_MAXIMUM_MEDIA_QUERY} {
|
|
45
|
+
margin: 10px 5px 0 0;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
}
|
|
48
|
+
`
|
|
49
|
+
const StyledButton = styled(Button)`
|
|
50
|
+
margin: 2px 0 2px 0;
|
|
51
|
+
font-size: 0.8em !important;
|
|
52
|
+
padding: 1px 5px;
|
|
53
|
+
|
|
54
|
+
${MOBILE_MAXIMUM_MEDIA_QUERY} {
|
|
55
|
+
margin: 2px 5px 2px 0;
|
|
56
|
+
width: fit-content;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
${SMALL_SCREEN_MAXIMUM_MEDIA_QUERY} {
|
|
60
|
+
margin: 2px 0 2px 0;
|
|
61
|
+
width: 100%;
|
|
62
|
+
max-width: 200px;
|
|
63
|
+
}
|
|
64
|
+
`
|
|
65
|
+
|
|
66
|
+
const StyledDate = styled.div`
|
|
67
|
+
text-align: left;
|
|
68
|
+
width: 15%;
|
|
69
|
+
`
|
|
70
|
+
const IconButtonWrapper = styled(Button)`
|
|
71
|
+
-webkit-box-align: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
-webkit-box-pack: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
margin-right: 0.5rem;
|
|
76
|
+
display: inline-block !important;
|
|
77
|
+
margin-left: 0.5rem;
|
|
78
|
+
width: auto;
|
|
79
|
+
`
|
|
80
|
+
const IconWrapper = styled.div`
|
|
81
|
+
margin-left: 0.5rem;
|
|
82
|
+
display: inline-block;
|
|
83
|
+
`
|
|
84
|
+
|
|
85
|
+
const DiagnosisSummary: FC<Props> = ({
|
|
86
|
+
condition,
|
|
87
|
+
extendedTemplateDisplayName,
|
|
88
|
+
extensionTemplateDisplayName,
|
|
89
|
+
extensionClickHandler,
|
|
90
|
+
isReadOnly = false,
|
|
91
|
+
dateOnlyView = false,
|
|
92
|
+
canExtendDiagnosis = false,
|
|
93
|
+
controls = [],
|
|
94
|
+
...rest
|
|
95
|
+
}) => {
|
|
96
|
+
if (condition.metadata.isRedacted) {
|
|
97
|
+
return (
|
|
98
|
+
<StyledSummary {...rest}>
|
|
99
|
+
<Redacted condition={condition} />
|
|
100
|
+
</StyledSummary>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const enteredInError = condition.verificationStatus === ConditionVerificationStatus.EnteredInError
|
|
105
|
+
|
|
106
|
+
const snippetHoverText = condition?.metadata.tag?.find((coding) => coding?.system === SNIPPET_HOVER_TEXT)?.display
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<StyledSummary {...rest}>
|
|
110
|
+
<StyledLeftContainer>
|
|
111
|
+
<StyledDescription>
|
|
112
|
+
<StyledTitle>
|
|
113
|
+
<Title enteredInError={enteredInError} text={snippetHoverText} />
|
|
114
|
+
</StyledTitle>
|
|
115
|
+
{extensionTemplateDisplayName && !isReadOnly && canExtendDiagnosis && !enteredInError && (
|
|
116
|
+
<IconButtonWrapper
|
|
117
|
+
onClick={extensionClickHandler}
|
|
118
|
+
type="button"
|
|
119
|
+
styling={{ buttonStyle: 'clear' }}
|
|
120
|
+
value=""
|
|
121
|
+
icon={<Icon type="folder-plus" size="medium" />}
|
|
122
|
+
iconPlacement="center"
|
|
123
|
+
iconColour={BTN_COLOURS.PRIMARY.VALUE}
|
|
124
|
+
title={`This diagnosis can be extended further using form '${extensionTemplateDisplayName}' by clicking here`}
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
127
|
+
{extendedTemplateDisplayName && (
|
|
128
|
+
<IconWrapper>
|
|
129
|
+
<Icon
|
|
130
|
+
type="comment"
|
|
131
|
+
size="medium"
|
|
132
|
+
title={`This diagnosis has been extended beyond standard diagnosis with form '${extendedTemplateDisplayName}'.
|
|
133
|
+
To view these extra details, click into the full diagnosis detail or edit the existing form.`}
|
|
134
|
+
/>
|
|
135
|
+
</IconWrapper>
|
|
136
|
+
)}
|
|
137
|
+
</StyledDescription>
|
|
138
|
+
|
|
139
|
+
{!isReadOnly && controls.length > 0 && (
|
|
140
|
+
<StyledControlsContainer>
|
|
141
|
+
{controls.map((props, index) => (
|
|
142
|
+
<StyledButton key={index} {...props} />
|
|
143
|
+
))}
|
|
144
|
+
</StyledControlsContainer>
|
|
145
|
+
)}
|
|
146
|
+
</StyledLeftContainer>
|
|
147
|
+
<StyledDate>
|
|
148
|
+
<DateSummary enteredInError={enteredInError} datetime={condition?.assertedDate} dateOnlyView={dateOnlyView} />
|
|
149
|
+
<OnsetDateEstimated enteredInError={enteredInError} condition={condition} />
|
|
150
|
+
</StyledDate>
|
|
151
|
+
</StyledSummary>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
156
|
+
condition: Condition
|
|
157
|
+
extendedTemplateDisplayName?: string | undefined
|
|
158
|
+
extensionTemplateDisplayName?: string | undefined
|
|
159
|
+
extensionClickHandler?(): void
|
|
160
|
+
isReadOnly: boolean
|
|
161
|
+
dateOnlyView?: boolean
|
|
162
|
+
controls?: ButtonProps[]
|
|
163
|
+
canExtendDiagnosis?: boolean
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export default DiagnosisSummary
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import { Condition } from '@ltht-react/types';
|
|
3
|
-
declare const DiagnosisCategory: FC<Props>;
|
|
4
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
condition: Condition;
|
|
6
|
-
enteredInError: boolean;
|
|
7
|
-
}
|
|
8
|
-
export default DiagnosisCategory;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
33
|
-
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
34
|
-
var styles_1 = require("@ltht-react/styles");
|
|
35
|
-
var utils_1 = require("@ltht-react/utils");
|
|
36
|
-
var StyledConditionCategory = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-align: left;\n font-size: smaller;\n padding-top: 0.25rem;\n text-decoration: ", ";\n"], ["\n color: ", ";\n text-align: left;\n font-size: smaller;\n padding-top: 0.25rem;\n text-decoration: ", ";\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE, function (_a) {
|
|
37
|
-
var enteredInError = _a.enteredInError;
|
|
38
|
-
return (enteredInError ? 'line-through' : 'none');
|
|
39
|
-
});
|
|
40
|
-
var DiagnosisCategory = function (_a) {
|
|
41
|
-
var condition = _a.condition, enteredInError = _a.enteredInError, rest = __rest(_a, ["condition", "enteredInError"]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(StyledConditionCategory, __assign({ enteredInError: enteredInError }, rest, { children: (0, utils_1.codeableConceptDisplaySummary)(condition.severity) })));
|
|
43
|
-
};
|
|
44
|
-
exports.default = DiagnosisCategory;
|
|
45
|
-
var templateObject_1;
|
|
46
|
-
//# sourceMappingURL=diagnosis-category.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diagnosis-category.js","sourceRoot":"","sources":["../../src/atoms/diagnosis-category.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAEpC,6CAAiD;AAEjD,2CAAiE;AAEjE,IAAM,uBAAuB,GAAG,gBAAM,CAAC,GAAG,sLAAoB,aACnD,EAA4B,6FAIlB,EAAkE,KACtF,KALU,qBAAY,CAAC,SAAS,CAAC,KAAK,EAIlB,UAAC,EAAkB;QAAhB,cAAc,oBAAA;IAAO,OAAA,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;AAA1C,CAA0C,CACtF,CAAA;AAED,IAAM,iBAAiB,GAAc,UAAC,EAAsC;IAApC,IAAA,SAAS,eAAA,EAAE,cAAc,oBAAA,EAAK,IAAI,cAApC,+BAAsC,CAAF;IAAO,OAAA,CAC/E,uBAAC,uBAAuB,aAAC,cAAc,EAAE,cAAc,IAAM,IAAI,cAC9D,IAAA,qCAA6B,EAAC,SAAS,CAAC,QAAQ,CAAC,IAC1B,CAC3B,CAAA;CAAA,CAAA;AAWD,kBAAe,iBAAiB,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import { Condition } from '@ltht-react/types';
|
|
3
|
-
declare const DiagnosisOnsetEstimated: FC<Props>;
|
|
4
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
condition: Condition;
|
|
6
|
-
enteredInError: boolean;
|
|
7
|
-
}
|
|
8
|
-
export default DiagnosisOnsetEstimated;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
33
|
-
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
34
|
-
var styles_1 = require("@ltht-react/styles");
|
|
35
|
-
var utils_1 = require("@ltht-react/utils");
|
|
36
|
-
var StyledOnsetEstimated = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-size: x-small;\n white-space: pre-wrap;\n display: inline-block;\n text-decoration: ", ";\n"], ["\n color: ", ";\n font-size: x-small;\n white-space: pre-wrap;\n display: inline-block;\n text-decoration: ", ";\n"])), styles_1.TEXT_COLOURS.INFO, function (_a) {
|
|
37
|
-
var enteredInError = _a.enteredInError;
|
|
38
|
-
return (enteredInError ? 'line-through' : 'none');
|
|
39
|
-
});
|
|
40
|
-
var DiagnosisOnsetEstimated = function (_a) {
|
|
41
|
-
var condition = _a.condition, enteredInError = _a.enteredInError, rest = __rest(_a, ["condition", "enteredInError"]);
|
|
42
|
-
var onsetDateEstimated = (0, utils_1.getBooleanExtension)(condition.extension, 'https://fhir.leedsth.nhs.uk/ValueSet/diagnosis-onset-date-estimated-1');
|
|
43
|
-
return ((0, jsx_runtime_1.jsx)(StyledOnsetEstimated, __assign({ enteredInError: enteredInError }, rest, { children: onsetDateEstimated ? ' (estimated)' : '' })));
|
|
44
|
-
};
|
|
45
|
-
exports.default = DiagnosisOnsetEstimated;
|
|
46
|
-
var templateObject_1;
|
|
47
|
-
//# sourceMappingURL=diagnosis-onset-estimated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diagnosis-onset-estimated.js","sourceRoot":"","sources":["../../src/atoms/diagnosis-onset-estimated.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAEpC,6CAAiD;AAGjD,2CAAuD;AAEvD,IAAM,oBAAoB,GAAG,gBAAM,CAAC,GAAG,4LAAoB,aAChD,EAAiB,mGAIP,EAAkE,KACtF,KALU,qBAAY,CAAC,IAAI,EAIP,UAAC,EAAkB;QAAhB,cAAc,oBAAA;IAAO,OAAA,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;AAA1C,CAA0C,CACtF,CAAA;AAED,IAAM,uBAAuB,GAAc,UAAC,EAAsC;IAApC,IAAA,SAAS,eAAA,EAAE,cAAc,oBAAA,EAAK,IAAI,cAApC,+BAAsC,CAAF;IAC9E,IAAM,kBAAkB,GAAG,IAAA,2BAAmB,EAC5C,SAAS,CAAC,SAAS,EACnB,uEAAuE,CACxE,CAAA;IAED,OAAO,CACL,uBAAC,oBAAoB,aAAC,cAAc,EAAE,cAAc,IAAM,IAAI,cAC3D,kBAAkB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,IACpB,CACxB,CAAA;AACH,CAAC,CAAA;AAWD,kBAAe,uBAAuB,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import { Condition } from '@ltht-react/types';
|
|
3
|
-
declare const DiagnosisStatus: FC<Props>;
|
|
4
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
condition: Condition;
|
|
6
|
-
enteredInError: boolean;
|
|
7
|
-
}
|
|
8
|
-
export default DiagnosisStatus;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
33
|
-
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
34
|
-
var styles_1 = require("@ltht-react/styles");
|
|
35
|
-
var utils_1 = require("@ltht-react/utils");
|
|
36
|
-
var StyledConditionStatus = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-align: left;\n font-size: smaller;\n padding-top: 0.25rem;\n text-decoration: ", ";\n"], ["\n color: ", ";\n text-align: left;\n font-size: smaller;\n padding-top: 0.25rem;\n text-decoration: ", ";\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE, function (_a) {
|
|
37
|
-
var enteredInError = _a.enteredInError;
|
|
38
|
-
return (enteredInError ? 'line-through' : 'none');
|
|
39
|
-
});
|
|
40
|
-
var DiagnosisStatus = function (_a) {
|
|
41
|
-
var condition = _a.condition, enteredInError = _a.enteredInError, rest = __rest(_a, ["condition", "enteredInError"]);
|
|
42
|
-
var values = [];
|
|
43
|
-
if (condition.clinicalStatus)
|
|
44
|
-
values.push((0, utils_1.titleCase)(condition.clinicalStatus));
|
|
45
|
-
if (condition.verificationStatus)
|
|
46
|
-
values.push((0, utils_1.titleCase)(condition.verificationStatus));
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(StyledConditionStatus, __assign({ enteredInError: enteredInError }, rest, { children: values.length > 0 ? values.join(' - ') : 'Insufficient data provided' })));
|
|
48
|
-
};
|
|
49
|
-
exports.default = DiagnosisStatus;
|
|
50
|
-
var templateObject_1;
|
|
51
|
-
//# sourceMappingURL=diagnosis-status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diagnosis-status.js","sourceRoot":"","sources":["../../src/atoms/diagnosis-status.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAEpC,6CAAiD;AAEjD,2CAA6C;AAE7C,IAAM,qBAAqB,GAAG,gBAAM,CAAC,GAAG,sLAAoB,aACjD,EAA4B,6FAIlB,EAAkE,KACtF,KALU,qBAAY,CAAC,SAAS,CAAC,KAAK,EAIlB,UAAC,EAAkB;QAAhB,cAAc,oBAAA;IAAO,OAAA,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;AAA1C,CAA0C,CACtF,CAAA;AAED,IAAM,eAAe,GAAc,UAAC,EAAsC;IAApC,IAAA,SAAS,eAAA,EAAE,cAAc,oBAAA,EAAK,IAAI,cAApC,+BAAsC,CAAF;IACtE,IAAM,MAAM,GAAG,EAAE,CAAA;IAEjB,IAAI,SAAS,CAAC,cAAc;QAAE,MAAM,CAAC,IAAI,CAAC,IAAA,iBAAS,EAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAA;IAC9E,IAAI,SAAS,CAAC,kBAAkB;QAAE,MAAM,CAAC,IAAI,CAAC,IAAA,iBAAS,EAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAA;IAEtF,OAAO,CACL,uBAAC,qBAAqB,aAAC,cAAc,EAAE,cAAc,IAAM,IAAI,cAC5D,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,4BAA4B,IAChD,CACzB,CAAA;AACH,CAAC,CAAA;AAWD,kBAAe,eAAe,CAAA"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
33
|
-
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
34
|
-
var styles_1 = require("@ltht-react/styles");
|
|
35
|
-
var StyledConditionSubHeader = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-align: left;\n font-size: smaller;\n padding-top: 0.25rem;\n text-decoration: ", ";\n"], ["\n color: ", ";\n text-align: left;\n font-size: smaller;\n padding-top: 0.25rem;\n text-decoration: ", ";\n"])), styles_1.TEXT_COLOURS.SECONDARY.VALUE, function (_a) {
|
|
36
|
-
var enteredInError = _a.enteredInError;
|
|
37
|
-
return (enteredInError ? 'line-through' : 'none');
|
|
38
|
-
});
|
|
39
|
-
var DiagnosisSubHeader = function (_a) {
|
|
40
|
-
var text = _a.text, enteredInError = _a.enteredInError, rest = __rest(_a, ["text", "enteredInError"]);
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(StyledConditionSubHeader, __assign({ enteredInError: enteredInError }, rest, { children: text })));
|
|
42
|
-
};
|
|
43
|
-
exports.default = DiagnosisSubHeader;
|
|
44
|
-
var templateObject_1;
|
|
45
|
-
//# sourceMappingURL=diagnosis-sub-header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diagnosis-sub-header.js","sourceRoot":"","sources":["../../src/atoms/diagnosis-sub-header.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AAEpC,6CAAiD;AAEjD,IAAM,wBAAwB,GAAG,gBAAM,CAAC,GAAG,sLAAoB,aACpD,EAA4B,6FAIlB,EAAkE,KACtF,KALU,qBAAY,CAAC,SAAS,CAAC,KAAK,EAIlB,UAAC,EAAkB;QAAhB,cAAc,oBAAA;IAAO,OAAA,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;AAA1C,CAA0C,CACtF,CAAA;AAED,IAAM,kBAAkB,GAAc,UAAC,EAAiC;IAA/B,IAAA,IAAI,UAAA,EAAE,cAAc,oBAAA,EAAK,IAAI,cAA/B,0BAAiC,CAAF;IAAO,OAAA,CAC3E,uBAAC,wBAAwB,aAAC,cAAc,EAAE,cAAc,IAAM,IAAI,cAC/D,IAAI,IACoB,CAC5B,CAAA;CAAA,CAAA;AAWD,kBAAe,kBAAkB,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import { Condition } from '@ltht-react/types';
|
|
3
|
-
declare const DiagnosisTitle: FC<Props>;
|
|
4
|
-
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
condition: Condition;
|
|
6
|
-
enteredInError: boolean;
|
|
7
|
-
}
|
|
8
|
-
export default DiagnosisTitle;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
33
|
-
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
34
|
-
var styles_1 = require("@ltht-react/styles");
|
|
35
|
-
var utils_1 = require("@ltht-react/utils");
|
|
36
|
-
var StyledConditionTitle = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-align: left;\n text-decoration: ", ";\n"], ["\n color: ", ";\n text-align: left;\n text-decoration: ", ";\n"])), styles_1.TEXT_COLOURS.PRIMARY, function (_a) {
|
|
37
|
-
var enteredInError = _a.enteredInError;
|
|
38
|
-
return (enteredInError ? 'line-through' : 'none');
|
|
39
|
-
});
|
|
40
|
-
var DiagnosisTitle = function (_a) {
|
|
41
|
-
var condition = _a.condition, enteredInError = _a.enteredInError, rest = __rest(_a, ["condition", "enteredInError"]);
|
|
42
|
-
var codes = [];
|
|
43
|
-
var snippets = [];
|
|
44
|
-
if (condition.code)
|
|
45
|
-
codes.push(condition.code);
|
|
46
|
-
snippets.push((0, utils_1.codeableConceptTextSummary)(codes));
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(StyledConditionTitle, __assign({ enteredInError: enteredInError }, rest, { children: snippets.length > 0 ? snippets.join(', ') : 'Insufficient data provided' })));
|
|
48
|
-
};
|
|
49
|
-
exports.default = DiagnosisTitle;
|
|
50
|
-
var templateObject_1;
|
|
51
|
-
//# sourceMappingURL=diagnosis-title.js.map
|