|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/PatientType.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
|
@ -18,8 +19,9 @@ import '../../../../routes.dart';
|
|
|
|
|
|
|
|
|
|
class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
final MyReferredPatientModel referredPatient;
|
|
|
|
|
final PatientType patientType;
|
|
|
|
|
|
|
|
|
|
ReferredPatientDetailScreen(this.referredPatient);
|
|
|
|
|
ReferredPatientDetailScreen(this.referredPatient, this.patientType);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -74,7 +76,8 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
.pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
"patient": patient,
|
|
|
|
|
"patientType": "1",
|
|
|
|
|
"isInpatient": true,
|
|
|
|
|
"isInpatient":
|
|
|
|
|
patientType == PatientType.IN_PATIENT,
|
|
|
|
|
"arrivalType": "1",
|
|
|
|
|
"from": AppDateUtils.convertDateToFormat(
|
|
|
|
|
DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
@ -93,14 +96,15 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: (){
|
|
|
|
|
onTap: () {
|
|
|
|
|
PatiantInformtion patient =
|
|
|
|
|
model.getPatientFromReferral(referredPatient);
|
|
|
|
|
model.getPatientFromReferral(referredPatient);
|
|
|
|
|
Navigator.of(context)
|
|
|
|
|
.pushNamed(PATIENTS_PROFILE, arguments: {
|
|
|
|
|
"patient": patient,
|
|
|
|
|
"patientType": "1",
|
|
|
|
|
"isInpatient": true,
|
|
|
|
|
"isInpatient":
|
|
|
|
|
patientType == PatientType.IN_PATIENT,
|
|
|
|
|
"arrivalType": "1",
|
|
|
|
|
"from": AppDateUtils.convertDateToFormat(
|
|
|
|
|
DateTime.now(), 'yyyy-MM-dd'),
|
|
|
|
|
@ -236,36 +240,37 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if(referredPatient
|
|
|
|
|
.frequencyDescription != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.frequency +
|
|
|
|
|
": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referredPatient
|
|
|
|
|
.frequencyDescription,
|
|
|
|
|
if (referredPatient
|
|
|
|
|
.frequencyDescription !=
|
|
|
|
|
null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.frequency +
|
|
|
|
|
": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 *
|
|
|
|
|
SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referredPatient
|
|
|
|
|
.frequencyDescription,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -303,56 +308,65 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if(referredPatient.priorityDescription != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).priority +
|
|
|
|
|
": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient.priorityDescription,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if(referredPatient.mAXResponseTime != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.maxResponseTime +
|
|
|
|
|
": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referredPatient.mAXResponseTime != null?AppDateUtils.convertDateFromServerFormat(
|
|
|
|
|
referredPatient.mAXResponseTime,
|
|
|
|
|
"dd MMM,yyyy"):'',
|
|
|
|
|
if (referredPatient.priorityDescription != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).priority +
|
|
|
|
|
": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient.priorityDescription,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if (referredPatient.mAXResponseTime != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.maxResponseTime +
|
|
|
|
|
": ",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
referredPatient.mAXResponseTime !=
|
|
|
|
|
null
|
|
|
|
|
? AppDateUtils
|
|
|
|
|
.convertDateFromServerFormat(
|
|
|
|
|
referredPatient
|
|
|
|
|
.mAXResponseTime,
|
|
|
|
|
"dd MMM,yyyy")
|
|
|
|
|
: '',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
@ -518,11 +532,15 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
color: Color(0XFF2E303A),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
referredPatient
|
|
|
|
|
.referredDoctorRemarks == null ?'':referredPatient
|
|
|
|
|
.referredDoctorRemarks.isNotEmpty
|
|
|
|
|
? referredPatient.referredDoctorRemarks
|
|
|
|
|
: TranslationBase.of(context).notRepliedYet,
|
|
|
|
|
referredPatient.referredDoctorRemarks ==
|
|
|
|
|
null
|
|
|
|
|
? ''
|
|
|
|
|
: referredPatient.referredDoctorRemarks
|
|
|
|
|
.isNotEmpty
|
|
|
|
|
? referredPatient
|
|
|
|
|
.referredDoctorRemarks
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
.notRepliedYet,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 1.6 * SizeConfig.textMultiplier,
|
|
|
|
|
@ -538,6 +556,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (patientType == PatientType.IN_PATIENT)
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
child: AppButton(
|
|
|
|
|
@ -548,9 +567,11 @@ class ReferredPatientDetailScreen extends StatelessWidget {
|
|
|
|
|
fontSize: 1.8,
|
|
|
|
|
hPadding: 8,
|
|
|
|
|
vPadding: 12,
|
|
|
|
|
disabled: referredPatient.referredDoctorRemarks == null? true: referredPatient.referredDoctorRemarks.isNotEmpty
|
|
|
|
|
? false
|
|
|
|
|
: true,
|
|
|
|
|
disabled: referredPatient.referredDoctorRemarks == null
|
|
|
|
|
? true
|
|
|
|
|
: referredPatient.referredDoctorRemarks.isNotEmpty
|
|
|
|
|
? false
|
|
|
|
|
: true,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await model.verifyReferralDoctorRemarks(referredPatient);
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
|