Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

feat: Added blood type info to patient #2190

Merged
merged 6 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/patients/GeneralInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ const GeneralInformation = (props: Props): ReactElement => {
{ label: t('patient.types.private'), value: 'private' },
]

const bloodTypeOptions: Option[] = [
{ label: t('bloodType.apositive'), value: 'A+' },
{ label: t('bloodType.anegative'), value: 'A-' },
{ label: t('bloodType.abpositive'), value: 'AB+' },
{ label: t('bloodType.abnegative'), value: 'AB-' },
{ label: t('bloodType.bpositive'), value: 'B+' },
{ label: t('bloodType.bnegative'), value: 'B-' },
{ label: t('bloodType.opositive'), value: 'O+' },
{ label: t('bloodType.onegative'), value: 'O-' },
{ label: t('bloodType.unknown'), value: 'unknown' },
]

return (
<div>
<Panel title={t('patient.basicInformation')} color="primary" collapsible>
Expand Down Expand Up @@ -145,6 +157,16 @@ const GeneralInformation = (props: Props): ReactElement => {
isEditable={isEditable}
/>
</div>
<div className="col">
<SelectWithLabelFormGroup
name="bloodType"
label={t('patient.bloodType')}
options={bloodTypeOptions}
defaultSelected={bloodTypeOptions.filter(({ value }) => value === patient.bloodType)}
onChange={(values) => onFieldChange('bloodType', values[0])}
isEditable={isEditable}
/>
</div>
saksham93 marked this conversation as resolved.
Show resolved Hide resolved
</div>
<div className="row">
<div className="col">
Expand Down
13 changes: 13 additions & 0 deletions src/shared/locales/enUs/translations/blood-type/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
bloodType: {
apositive: 'A+',
anegative: 'A-',
abpositive: 'AB+',
abnegative: 'AB-',
bpositive: 'B+',
bnegative: 'B-',
opositive: 'O+',
onegative: 'O-',
unknown: 'Unknown',
},
}
2 changes: 2 additions & 0 deletions src/shared/locales/enUs/translations/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import actions from './actions'
import bloodType from './blood-type'
import dashboard from './dashboard'
import incidents from './incidents'
import labs from './labs'
Expand All @@ -22,4 +23,5 @@ export default {
...labs,
...incidents,
...settings,
...bloodType,
}
1 change: 1 addition & 0 deletions src/shared/locales/enUs/translations/patient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default {
approximateAge: 'Approximate Age',
placeOfBirth: 'Place of Birth',
sex: 'Sex',
bloodType: 'Blood Type',
contactInfoType: {
label: 'Type',
options: {
Expand Down
1 change: 1 addition & 0 deletions src/shared/model/Patient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ export default interface Patient extends AbstractDBModel, Name, ContactInformati
notes?: Note[]
index: string
carePlans: CarePlan[]
bloodType: string
}