medical report design changes

merge-requests/710/head
mosazaid 5 years ago
parent 4b6263ca1a
commit c82a4a05d5

@ -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<String, dynamic> 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;
}

@ -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,
)
],
),
),

@ -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: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(context).clinic +
" : ",
style: TextStyle(fontSize: 12)),
new TextSpan(
text:
patientInfo.clinicName,
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 13)),
],
),
),
),
],
),
]))
]),
isFromLiveCare

Loading…
Cancel
Save