@ovok/native/patient
Patient card, list, name, gender and birth-date components.
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
Patient card, list, name, gender and birth-date components.
Import from @ovok/native/patient.
Components
PatientList
const PatientList: ForwardRefExoticComponent<Omit<FlashListProps<Patient>, "renderItem"> & object & RefAttributes<FlashListRef<Patient>>>;Scrollable list of patients; defaults to a PatientCard per row.
PatientCard()
function PatientCard(props): Element;Pressable card for a patient; compose it with the PatientCard.* sub-components.
Parameters
| Parameter | Type |
|---|---|
props | TouchableOpacityProps |
Returns
Element
Type Aliases
PatientBirthDateTextProps
type PatientBirthDateTextProps = TextProps & object & (
| {
dateFormat?: string;
variant: "date";
}
| {
dateFormat?: string;
variant: "both";
}
| {
dateFormat?: undefined;
variant: "age";
});Props for the patient birth date text; also accepts Text props.
Type Declaration
| Name | Type | Description |
|---|---|---|
birthDate | string | Birth date as an ISO date string. |
PatientGenderProps
type PatientGenderProps = ViewProps & object;Props for the patient gender label; also accepts View props.
Type Declaration
| Name | Type | Description |
|---|---|---|
gender? | "male" | "female" | "other" | Patient gender. |
showIcon? | boolean | Whether to show the gender icon. |
testID? | string | Test identifier. |
textProps? | TextProps | Props passed to the label text. |
variant? | "chip" | "default" | Visual style: a chip or plain text. |
PatientListProps
type PatientListProps<TData> = Omit<FlashListProps<TData>, "renderItem"> & object;Props for PatientList; also accepts FlashList props except renderItem.
Type Parameters
Type Declaration
| Name | Type | Description |
|---|---|---|
data | TData[] | Patients to list. |
onItemPress()? | (item, index) => void | Called with the patient and its index when a row is pressed. |
renderItem? | ListRenderItem<TData> | Custom row renderer; defaults to a PatientCard with name, gender and age. |
PatientNameProps
type PatientNameProps = TextProps & object;Props for the patient name text; also accepts Text props.
Type Declaration
| Name | Type | Description |
|---|---|---|
format? | "firstLast" | "lastFirst" | Order of the parts: first name first or last name first. |
name? | HumanName[] | FHIR names of the patient. |
testID? | string | Test identifier. |
Last updated on