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 reportData;
String setupID; String setupID;
int projectID; int projectID;
String projectName;
String projectNameN;
int patientID; int patientID;
String invoiceNo; String invoiceNo;
int status; int status;
@ -19,12 +21,17 @@ class MedicalReportModel {
String doctorImageURL; String doctorImageURL;
String doctorName; String doctorName;
String doctorNameN; String doctorNameN;
int clinicID;
String clinicName;
String clinicNameN;
String reportDataHtml; String reportDataHtml;
MedicalReportModel( MedicalReportModel(
{this.reportData, {this.reportData,
this.setupID, this.setupID,
this.projectID, this.projectID,
this.projectName,
this.projectNameN,
this.patientID, this.patientID,
this.invoiceNo, this.invoiceNo,
this.status, this.status,
@ -42,12 +49,17 @@ class MedicalReportModel {
this.doctorImageURL, this.doctorImageURL,
this.doctorName, this.doctorName,
this.doctorNameN, this.doctorNameN,
this.clinicID,
this.clinicName,
this.clinicNameN,
this.reportDataHtml}); this.reportDataHtml});
MedicalReportModel.fromJson(Map<String, dynamic> json) { MedicalReportModel.fromJson(Map<String, dynamic> json) {
reportData = json['ReportData']; reportData = json['ReportData'];
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
patientID = json['PatientID']; patientID = json['PatientID'];
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];
status = json['Status']; status = json['Status'];
@ -65,6 +77,9 @@ class MedicalReportModel {
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName']; doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN']; doctorNameN = json['DoctorNameN'];
clinicID = json['ClinicID'];
clinicName = json['ClinicName'];
clinicNameN = json['ClinicNameN'];
reportDataHtml = json['ReportDataHtml']; reportDataHtml = json['ReportDataHtml'];
} }
@ -73,6 +88,8 @@ class MedicalReportModel {
data['ReportData'] = this.reportData; data['ReportData'] = this.reportData;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['ProjectNameN'] = this.projectNameN;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['InvoiceNo'] = this.invoiceNo; data['InvoiceNo'] = this.invoiceNo;
data['Status'] = this.status; data['Status'] = this.status;
@ -90,6 +107,9 @@ class MedicalReportModel {
data['DoctorImageURL'] = this.doctorImageURL; data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorName'] = this.doctorName; data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN; data['DoctorNameN'] = this.doctorNameN;
data['ClinicID'] = this.clinicID;
data['ClinicName'] = this.clinicName;
data['ClinicNameN'] = this.clinicNameN;
data['ReportDataHtml'] = this.reportDataHtml; data['ReportDataHtml'] = this.reportDataHtml;
return data; return data;
} }

@ -89,17 +89,15 @@ class MedicalReportPage extends StatelessWidget {
...List.generate( ...List.generate(
model.medicalReportList.length, model.medicalReportList.length,
(index) => InkWell( (index) => InkWell(
onTap: (){ onTap: () {
if (model.medicalReportList[index].status == if (model.medicalReportList[index].status == 1) {
1) {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_DETAIL, PATIENT_MEDICAL_REPORT_DETAIL,
arguments: { arguments: {
'patient': patient, 'patient': patient,
'patientType': patientType, 'patientType': patientType,
'arrivalType': arrivalType, 'arrivalType': arrivalType,
'medicalReport': 'medicalReport': model.medicalReportList[index]
model.medicalReportList[index]
}); });
} else { } else {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
@ -109,8 +107,7 @@ class MedicalReportPage extends StatelessWidget {
'patientType': patientType, 'patientType': patientType,
'arrivalType': arrivalType, 'arrivalType': arrivalType,
'type': MedicalReportStatus.ADD, 'type': MedicalReportStatus.ADD,
'medicalReport': 'medicalReport': model.medicalReportList[index]
model.medicalReportList[index]
}); });
} }
}, },
@ -132,12 +129,13 @@ class MedicalReportPage extends StatelessWidget {
AppText( AppText(
model.medicalReportList[index].status == 1 model.medicalReportList[index].status == 1
? TranslationBase.of(context).onHold ? TranslationBase.of(context).onHold
: TranslationBase.of(context).verified, : TranslationBase.of(context)
color: .verified,
model.medicalReportList[index].status == color: model.medicalReportList[index]
1 .status ==
? Colors.red[700] 1
: Colors.green[700], ? Colors.red[700]
: Colors.green[700],
fontSize: 1.4 * SizeConfig.textMultiplier, fontSize: 1.4 * SizeConfig.textMultiplier,
bold: true, bold: true,
), ),
@ -173,37 +171,55 @@ class MedicalReportPage extends StatelessWidget {
], ],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 0, top: 4, right: 8, bottom: 0), left: 0, top: 4, right: 8, bottom: 0),
child: LargeAvatar( child: LargeAvatar(
name: projectViewModel.isArabic name: projectViewModel.isArabic
? model ? model.medicalReportList[index]
.medicalReportList[index].doctorNameN .doctorNameN
: model : model.medicalReportList[index]
.medicalReportList[index].doctorName, .doctorName,
url: model url: model.medicalReportList[index]
.medicalReportList[index].doctorImageURL, .doctorImageURL,
), ),
width: 50, width: 50,
height: 50, height: 50,
), ),
Expanded( Expanded(
child: Container( child: Container(
height: 50, child: Column(
child: AppText( crossAxisAlignment:
TranslationBase.of(context).showDetail, CrossAxisAlignment.start,
fontSize: 1.4 * SizeConfig.textMultiplier, 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( Container(
height: 50,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ 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, fontWeight: FontWeight.w700,
fontSize: 13)), 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 isFromLiveCare

Loading…
Cancel
Save