@ltht-react/care-plan-detail 2.0.190 → 2.0.192
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 +15 -15
- package/package.json +7 -7
- package/src/index.tsx +34 -34
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# CarePlanDetail
|
|
2
|
-
|
|
3
|
-
<!-- STORY -->
|
|
4
|
-
|
|
5
|
-
### Import
|
|
6
|
-
|
|
7
|
-
```js
|
|
8
|
-
import CarePlanDetail from '@ltht-react/care-plan-detail'
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
### Usage
|
|
12
|
-
|
|
13
|
-
```jsx
|
|
14
|
-
<CarePlanDetail />
|
|
15
|
-
```
|
|
1
|
+
# CarePlanDetail
|
|
2
|
+
|
|
3
|
+
<!-- STORY -->
|
|
4
|
+
|
|
5
|
+
### Import
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import CarePlanDetail from '@ltht-react/care-plan-detail'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Usage
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
<CarePlanDetail />
|
|
15
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ltht-react/care-plan-detail",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.192",
|
|
4
4
|
"description": "ltht-react clinical CarePlanDetail component.",
|
|
5
5
|
"author": "LTHT",
|
|
6
6
|
"homepage": "",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@emotion/react": "^11.0.0",
|
|
30
30
|
"@emotion/styled": "^11.0.0",
|
|
31
|
-
"@ltht-react/description-list": "^2.0.
|
|
32
|
-
"@ltht-react/styles": "^2.0.
|
|
33
|
-
"@ltht-react/type-detail": "^2.0.
|
|
34
|
-
"@ltht-react/types": "^2.0.
|
|
35
|
-
"@ltht-react/utils": "^2.0.
|
|
31
|
+
"@ltht-react/description-list": "^2.0.192",
|
|
32
|
+
"@ltht-react/styles": "^2.0.192",
|
|
33
|
+
"@ltht-react/type-detail": "^2.0.192",
|
|
34
|
+
"@ltht-react/types": "^2.0.192",
|
|
35
|
+
"@ltht-react/utils": "^2.0.192",
|
|
36
36
|
"react": "^18.2.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "d97c241ba79c5e28edb4dec124e156cda6e9af66"
|
|
39
39
|
}
|
package/src/index.tsx
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { FC } from 'react'
|
|
2
|
-
import { CarePlan, DetailViewType } from '@ltht-react/types'
|
|
3
|
-
import {
|
|
4
|
-
StringDetail,
|
|
5
|
-
PeriodDetail,
|
|
6
|
-
NarrativeDetail,
|
|
7
|
-
ResourceReferenceListDetail,
|
|
8
|
-
CollapsibleDetailCollection,
|
|
9
|
-
CollapsibleDetailCollectionProps,
|
|
10
|
-
} from '@ltht-react/type-detail'
|
|
11
|
-
|
|
12
|
-
const CarePlanDetail: FC<Props> = ({ carePlan, viewType = DetailViewType.Compact }) => {
|
|
13
|
-
const performers = carePlan?.activity?.map((a) => a?.detail?.performer?.map((p) => p)).reduce((p) => p)
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<CollapsibleDetailCollection viewType={viewType}>
|
|
17
|
-
<StringDetail term="Plan" description={carePlan.title} />
|
|
18
|
-
<StringDetail term="Description" description={carePlan.description} />
|
|
19
|
-
<PeriodDetail period={carePlan.period} />
|
|
20
|
-
<StringDetail term="Intent" description={carePlan.intent.toString()} />
|
|
21
|
-
<StringDetail term="Status" description={carePlan.status.toString()} />
|
|
22
|
-
<NarrativeDetail narrative={carePlan.text} />
|
|
23
|
-
<ResourceReferenceListDetail term="Addresses" resourceReferences={carePlan?.addresses} />
|
|
24
|
-
<ResourceReferenceListDetail term="Performer(s)" resourceReferences={performers} />
|
|
25
|
-
<ResourceReferenceListDetail term="Author(s)" resourceReferences={carePlan?.author} />
|
|
26
|
-
</CollapsibleDetailCollection>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface Props extends CollapsibleDetailCollectionProps {
|
|
31
|
-
carePlan: CarePlan
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default CarePlanDetail
|
|
1
|
+
import { FC } from 'react'
|
|
2
|
+
import { CarePlan, DetailViewType } from '@ltht-react/types'
|
|
3
|
+
import {
|
|
4
|
+
StringDetail,
|
|
5
|
+
PeriodDetail,
|
|
6
|
+
NarrativeDetail,
|
|
7
|
+
ResourceReferenceListDetail,
|
|
8
|
+
CollapsibleDetailCollection,
|
|
9
|
+
CollapsibleDetailCollectionProps,
|
|
10
|
+
} from '@ltht-react/type-detail'
|
|
11
|
+
|
|
12
|
+
const CarePlanDetail: FC<Props> = ({ carePlan, viewType = DetailViewType.Compact }) => {
|
|
13
|
+
const performers = carePlan?.activity?.map((a) => a?.detail?.performer?.map((p) => p)).reduce((p) => p)
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<CollapsibleDetailCollection viewType={viewType}>
|
|
17
|
+
<StringDetail term="Plan" description={carePlan.title} />
|
|
18
|
+
<StringDetail term="Description" description={carePlan.description} />
|
|
19
|
+
<PeriodDetail period={carePlan.period} />
|
|
20
|
+
<StringDetail term="Intent" description={carePlan.intent.toString()} />
|
|
21
|
+
<StringDetail term="Status" description={carePlan.status.toString()} />
|
|
22
|
+
<NarrativeDetail narrative={carePlan.text} />
|
|
23
|
+
<ResourceReferenceListDetail term="Addresses" resourceReferences={carePlan?.addresses} />
|
|
24
|
+
<ResourceReferenceListDetail term="Performer(s)" resourceReferences={performers} />
|
|
25
|
+
<ResourceReferenceListDetail term="Author(s)" resourceReferences={carePlan?.author} />
|
|
26
|
+
</CollapsibleDetailCollection>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface Props extends CollapsibleDetailCollectionProps {
|
|
31
|
+
carePlan: CarePlan
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default CarePlanDetail
|