@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

ParameterType
propsTouchableOpacityProps

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

NameTypeDescription
birthDatestringBirth date as an ISO date string.

PatientGenderProps

type PatientGenderProps = ViewProps & object;

Props for the patient gender label; also accepts View props.

Type Declaration

NameTypeDescription
gender?"male" | "female" | "other"Patient gender.
showIcon?booleanWhether to show the gender icon.
testID?stringTest identifier.
textProps?TextPropsProps 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 ParameterDefault type
TData extends PatientPatient

Type Declaration

NameTypeDescription
dataTData[]Patients to list.
onItemPress()?(item, index) => voidCalled 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

NameTypeDescription
format?"firstLast" | "lastFirst"Order of the parts: first name first or last name first.
name?HumanName[]FHIR names of the patient.
testID?stringTest identifier.

Last updated on

On this page