Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into medical_report_changes

 Conflicts:
	lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart
merge-requests/770/head
hussam al-habibeh 5 years ago
commit abb1e52515

@ -15,9 +15,8 @@ class PatientMedicalReportService extends BaseService {
body['AdmissionNo'] = patient.admissionNo; body['AdmissionNo'] = patient.admissionNo;
body['SetupID'] = doctorProfile.setupID; body['SetupID'] = doctorProfile.setupID;
body['ProjectID'] = doctorProfile.projectID; body['ProjectID'] = doctorProfile.projectID;
medicalReportList = [];
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) { await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) {
medicalReportList = [];
if (response['DAPP_ListMedicalReportList'] != null) { if (response['DAPP_ListMedicalReportList'] != null) {
response['DAPP_ListMedicalReportList'].forEach((v) { response['DAPP_ListMedicalReportList'].forEach((v) {
medicalReportList.add(MedicalReportModel.fromJson(v)); medicalReportList.add(MedicalReportModel.fromJson(v));

@ -303,13 +303,13 @@ class PatientReferralViewModel extends BaseViewModel {
String getReferralStatusNameByCode(int statusCode, BuildContext context) { String getReferralStatusNameByCode(int statusCode, BuildContext context) {
switch (statusCode) { switch (statusCode) {
case 1: case 1:
return TranslationBase.of(context).pending /*referralStatusHold*/; return TranslationBase.of(context).referralStatusHold /*pending*/;
case 2: case 2:
return TranslationBase.of(context).accepted /*referralStatusActive*/; return TranslationBase.of(context).referralStatusActive /* accepted*/;
case 4: case 4:
return TranslationBase.of(context).rejected /*referralStatusCancelled*/; return TranslationBase.of(context).referralStatusCancelled /*rejected*/;
case 46: case 46:
return TranslationBase.of(context).accepted /*referralStatusCompleted*/; return TranslationBase.of(context).referralStatusCompleted /*accepted*/;
case 63: case 63:
return TranslationBase.of(context).rejected /*referralStatusNotSeen*/; return TranslationBase.of(context).rejected /*referralStatusNotSeen*/;
default: default:

@ -24,7 +24,7 @@ class StartCallRes {
isAuthenticated = json['IsAuthenticated']; isAuthenticated = json['IsAuthenticated'];
messageStatus = json['MessageStatus']; messageStatus = json['MessageStatus'];
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
isRecording = json['isRecording']; isRecording = json['IsRecordedSession'] ?? false;
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -35,7 +35,7 @@ class StartCallRes {
data['IsAuthenticated'] = this.isAuthenticated; data['IsAuthenticated'] = this.isAuthenticated;
data['MessageStatus'] = this.messageStatus; data['MessageStatus'] = this.messageStatus;
data['AppointmentNo'] = this.appointmentNo; data['AppointmentNo'] = this.appointmentNo;
data['isRecording'] = this.isRecording; data['IsRecordedSession'] = this.isRecording ?? false;
return data; return data;
} }
} }

@ -44,7 +44,9 @@ class PatientReferralItemWidget extends StatelessWidget {
this.doctorAvatar, this.doctorAvatar,
this.referralDoctorName, this.referralDoctorName,
this.clinicDescription, this.clinicDescription,
this.infoIcon,this.isReferralClinic=false,this.referralClinic}); this.infoIcon,
this.isReferralClinic = false,
this.referralClinic});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -58,9 +60,13 @@ class PatientReferralItemWidget extends StatelessWidget {
child: CardWithBgWidget( child: CardWithBgWidget(
bgColor: referralStatusCode == 1 bgColor: referralStatusCode == 1
? Color(0xffc4aa54) ? Color(0xffc4aa54)
: referralStatusCode == 46 || referralStatusCode == 2 : referralStatusCode == 2
? Colors.green[700] ? Colors.green[700]
: Colors.red[700], : referralStatusCode == 46
? Colors.green[900]
: referralStatusCode == 4
? Colors.red[700]
: Colors.red[900],
hasBorder: false, hasBorder: false,
widget: Container( widget: Container(
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
@ -78,9 +84,13 @@ class PatientReferralItemWidget extends StatelessWidget {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: referralStatusCode == 1 color: referralStatusCode == 1
? Color(0xffc4aa54) ? Color(0xffc4aa54)
: referralStatusCode == 46 || referralStatusCode == 2 : referralStatusCode == 2
? Colors.green[700] ? Colors.green[700]
: Colors.red[700], : referralStatusCode == 46
? Colors.green[900]
: referralStatusCode == 4
? Colors.red[700]
: Colors.red[900],
), ),
AppText( AppText(
referredDate, referredDate,
@ -158,7 +168,10 @@ class PatientReferralItemWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
isSameBranch ? TranslationBase.of(context).referredFrom :TranslationBase.of(context).refClinic, isSameBranch
? TranslationBase.of(context)
.referredFrom
: TranslationBase.of(context).refClinic,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
@ -166,7 +179,13 @@ class PatientReferralItemWidget extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
!isReferralClinic? isSameBranch ? TranslationBase.of(context).sameBranch : TranslationBase.of(context).otherBranch: " "+referralClinic, !isReferralClinic
? isSameBranch
? TranslationBase.of(context)
.sameBranch
: TranslationBase.of(context)
.otherBranch
: " " + referralClinic,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,
@ -217,7 +236,7 @@ class PatientReferralItemWidget extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
remark??"", remark ?? "",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,
@ -261,13 +280,13 @@ class PatientReferralItemWidget extends StatelessWidget {
}, },
)) ))
: Container( : Container(
child: Image.asset( child: Image.asset(
patientGender == 1 patientGender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
), ),
), ),
Expanded( Expanded(

Loading…
Cancel
Save