fromStore static method
Implementation
static BeWellPrimaryPatientBannerViewModel fromStore(Store<CoreState> store) {
final Patient? patientRecord =
store.state.clinicalState?.patientPayload?.patientRecord;
return BeWellPrimaryPatientBannerViewModel(
patientName: patientRecord?.name?.first?.text ?? '',
patientAge: _getPatientAge(patientRecord?.birthDate),
patientDob: patientRecord?.birthDate ?? defaultDate,
patientGender: _getPatientGender(patientRecord?.gender),
patientPhoneNumber: patientRecord?.telecom?.first?.value ?? '',
photo: patientRecord?.photo,
);
}