diff --git a/lib/models/patient/MedicalReport/MeidcalReportModel.dart b/lib/models/patient/MedicalReport/MeidcalReportModel.dart index 473140d1..1acbc1b4 100644 --- a/lib/models/patient/MedicalReport/MeidcalReportModel.dart +++ b/lib/models/patient/MedicalReport/MeidcalReportModel.dart @@ -2,6 +2,8 @@ class MedicalReportModel { String reportData; String setupID; int projectID; + String projectName; + String projectNameN; int patientID; String invoiceNo; int status; @@ -19,12 +21,17 @@ class MedicalReportModel { String doctorImageURL; String doctorName; String doctorNameN; + int clinicID; + String clinicName; + String clinicNameN; String reportDataHtml; MedicalReportModel( {this.reportData, this.setupID, this.projectID, + this.projectName, + this.projectNameN, this.patientID, this.invoiceNo, this.status, @@ -42,12 +49,17 @@ class MedicalReportModel { this.doctorImageURL, this.doctorName, this.doctorNameN, + this.clinicID, + this.clinicName, + this.clinicNameN, this.reportDataHtml}); MedicalReportModel.fromJson(Map json) { reportData = json['ReportData']; setupID = json['SetupID']; projectID = json['ProjectID']; + projectName = json['ProjectName']; + projectNameN = json['ProjectNameN']; patientID = json['PatientID']; invoiceNo = json['InvoiceNo']; status = json['Status']; @@ -65,6 +77,9 @@ class MedicalReportModel { doctorImageURL = json['DoctorImageURL']; doctorName = json['DoctorName']; doctorNameN = json['DoctorNameN']; + clinicID = json['ClinicID']; + clinicName = json['ClinicName']; + clinicNameN = json['ClinicNameN']; reportDataHtml = json['ReportDataHtml']; } @@ -73,6 +88,8 @@ class MedicalReportModel { data['ReportData'] = this.reportData; data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['ProjectNameN'] = this.projectNameN; data['PatientID'] = this.patientID; data['InvoiceNo'] = this.invoiceNo; data['Status'] = this.status; @@ -90,6 +107,9 @@ class MedicalReportModel { data['DoctorImageURL'] = this.doctorImageURL; data['DoctorName'] = this.doctorName; data['DoctorNameN'] = this.doctorNameN; + data['ClinicID'] = this.clinicID; + data['ClinicName'] = this.clinicName; + data['ClinicNameN'] = this.clinicNameN; data['ReportDataHtml'] = this.reportDataHtml; return data; } diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index 746068ad..e2da651b 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -89,17 +89,15 @@ class MedicalReportPage extends StatelessWidget { ...List.generate( model.medicalReportList.length, (index) => InkWell( - onTap: (){ - if (model.medicalReportList[index].status == - 1) { + onTap: () { + if (model.medicalReportList[index].status == 1) { Navigator.of(context).pushNamed( PATIENT_MEDICAL_REPORT_DETAIL, arguments: { 'patient': patient, 'patientType': patientType, 'arrivalType': arrivalType, - 'medicalReport': - model.medicalReportList[index] + 'medicalReport': model.medicalReportList[index] }); } else { Navigator.of(context).pushNamed( @@ -109,8 +107,7 @@ class MedicalReportPage extends StatelessWidget { 'patientType': patientType, 'arrivalType': arrivalType, 'type': MedicalReportStatus.ADD, - 'medicalReport': - model.medicalReportList[index] + 'medicalReport': model.medicalReportList[index] }); } }, @@ -132,12 +129,13 @@ class MedicalReportPage extends StatelessWidget { AppText( model.medicalReportList[index].status == 1 ? TranslationBase.of(context).onHold - : TranslationBase.of(context).verified, - color: - model.medicalReportList[index].status == - 1 - ? Colors.red[700] - : Colors.green[700], + : TranslationBase.of(context) + .verified, + color: model.medicalReportList[index] + .status == + 1 + ? Colors.red[700] + : Colors.green[700], fontSize: 1.4 * SizeConfig.textMultiplier, bold: true, ), @@ -173,37 +171,55 @@ class MedicalReportPage extends StatelessWidget { ], ), Row( - crossAxisAlignment: CrossAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( margin: EdgeInsets.only( left: 0, top: 4, right: 8, bottom: 0), child: LargeAvatar( name: projectViewModel.isArabic - ? model - .medicalReportList[index].doctorNameN - : model - .medicalReportList[index].doctorName, - url: model - .medicalReportList[index].doctorImageURL, + ? model.medicalReportList[index] + .doctorNameN + : model.medicalReportList[index] + .doctorName, + url: model.medicalReportList[index] + .doctorImageURL, ), width: 50, height: 50, ), Expanded( child: Container( - height: 50, - child: AppText( - TranslationBase.of(context).showDetail, - fontSize: 1.4 * SizeConfig.textMultiplier, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + projectViewModel.isArabic + ? model.medicalReportList[index] + .projectNameN + : model.medicalReportList[index] + .projectName, + fontSize: + 1.6 * SizeConfig.textMultiplier, + color: Color(0xFF2E303A), + ), + AppText( + projectViewModel.isArabic + ? model.medicalReportList[index] + .clinicNameN + : model.medicalReportList[index] + .clinicName, + fontSize: + 1.6 * SizeConfig.textMultiplier, + color: Color(0xFF2E303A), + ), + ], ), ), - // child: Html( - // data: model.medicalReportList[index] - // .reportDataHtml ?? - // ""), ), Container( + height: 50, child: Column( mainAxisAlignment: MainAxisAlignment.end, children: [ @@ -224,7 +240,9 @@ class MedicalReportPage extends StatelessWidget { ), ), ), - SizedBox(height: 15,) + SizedBox( + height: 15, + ) ], ), ), diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index 45445bbf..2174e6d5 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -440,6 +440,35 @@ class PatientCard extends StatelessWidget { fontWeight: FontWeight.w700, fontSize: 13)), ]))), + if (isFromLiveCare) + Column( + children: [ + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ + new TextSpan( + text: + TranslationBase.of(context).clinic + + " : ", + style: TextStyle(fontSize: 12)), + new TextSpan( + text: + patientInfo.clinicName, + style: TextStyle( + fontWeight: FontWeight.w700, + fontSize: 13)), + ], + ), + ), + ), + ], + ), ])) ]), isFromLiveCare