Merge branch 'fix-issues' into 'development'

insurance approval & medical file design fix

See merge request Cloud_Solution/doctor_app_flutter!476
merge-requests/477/merge
Mohammad Aljammal 5 years ago
commit 2f0a2d4109

@ -58,6 +58,7 @@ class InsuranceApprovalModel {
String approvalStatusDescption; String approvalStatusDescption;
int unUsedCount; int unUsedCount;
String doctorImage; String doctorImage;
String projectName;
//String companyName; //String companyName;
String expiryDate; String expiryDate;
@ -91,7 +92,8 @@ class InsuranceApprovalModel {
this.rceiptOn, this.rceiptOn,
this.apporvalDetails, this.apporvalDetails,
this.appointmentNo, this.appointmentNo,
this.doctorImage}); this.doctorImage,
this.projectName});
//InsuranceApprovalDetails x = InsuranceApprovalDetails(); //InsuranceApprovalDetails x = InsuranceApprovalDetails();
@ -115,6 +117,7 @@ class InsuranceApprovalModel {
deviceTypeID = json['DeviceTypeID']; deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID']; patientID = json['PatientID'];
tokenID = json['TokenID']; tokenID = json['TokenID'];
projectName = json['ProjectName'];
patientTypeID = json['PatientTypeID']; patientTypeID = json['PatientTypeID'];
patientType = json['PatientType']; patientType = json['PatientType'];
eXuldAPPNO = json['EXuldAPPNO']; eXuldAPPNO = json['EXuldAPPNO'];
@ -148,6 +151,7 @@ class InsuranceApprovalModel {
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['DoctorImageURL'] = this.doctorImage; data['DoctorImageURL'] = this.doctorImage;
data['ProjectName'] = this.projectName;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType; data['PatientType'] = this.patientType;

@ -2355,6 +2355,34 @@
"search": [ "search": [
"verify-sms" "verify-sms"
] ]
},
{
"uid": "efc8c6ed2dab146bc55ca80fdd9bc511",
"css": "124",
"code": 59555,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M315.2 3.2L315.2 3.2A45.2 45.2 0 0 1 322.4 3.2S326 3.2 328.4 3.2H328.4A42.4 42.4 0 0 1 336 3.2H336A26.4 26.4 0 0 1 342 3.2H342A37.6 37.6 0 0 1 346.8 6.8 40 40 0 0 1 353.6 11.6L353.6 11.6 600.8 278.8A40 40 0 0 1 604.4 335.2 40 40 0 0 1 547.6 335.2L370 142.8V920H1250A40 40 0 0 1 1250 1000H330A40 40 0 0 1 290 960V129.2L66.4 329.2A40 40 0 0 1 10 325.6 40 40 0 0 1 0 299.2 40 40 0 0 1 13.2 269.2L304.8 10.4A36.4 36.4 0 0 1 310 7.2 40 40 0 0 1 315.2 3.2Z",
"width": 1290
},
"search": [
"124"
]
},
{
"uid": "2251120e332d8914aca7fb2d3fbe00f2",
"css": "123",
"code": 59556,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M773 755.3S773 755.3 773 755.3A38.8 38.8 0 0 0 773 749.5 21.7 21.7 0 0 0 773 745.1V745.1A55.8 55.8 0 0 0 773 739.2H773A25.7 25.7 0 0 0 773 734.6V734.6S770.9 732.1 769.9 730.5A31 31 0 0 0 766.2 725.3H766.2L558.1 529.6A31 31 0 0 0 514.1 531.5 31 31 0 0 0 516 575.2L665.1 713.2H62V31A31 31 0 0 0 0 31V744.2A31 31 0 0 0 31 775.2H675.3L520.3 948.5A31 31 0 1 0 566.8 989.5L766.2 764.7S766.2 762.2 768.4 760.9A33.5 33.5 0 0 0 773 755.3Z",
"width": 775
},
"search": [
"123"
]
} }
] ]
} }

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -26,6 +27,11 @@ class MedicalFileDetails extends StatefulWidget {
int encounterNumber; int encounterNumber;
int pp; int pp;
PatiantInformtion patient; PatiantInformtion patient;
String clinicName;
String episode;
String doctorName;
String vistDate;
String doctorImage;
MedicalFileDetails( MedicalFileDetails(
{this.age, {this.age,
@ -34,7 +40,12 @@ class MedicalFileDetails extends StatefulWidget {
this.gender, this.gender,
this.encounterNumber, this.encounterNumber,
this.pp, this.pp,
this.patient}); this.patient,
this.doctorName,
this.vistDate,
this.clinicName,
this.episode,
this.doctorImage});
@override @override
_MedicalFileDetailsState createState() => _MedicalFileDetailsState( _MedicalFileDetailsState createState() => _MedicalFileDetailsState(
@ -45,6 +56,11 @@ class MedicalFileDetails extends StatefulWidget {
encounterNumber: encounterNumber, encounterNumber: encounterNumber,
pp: pp, pp: pp,
patient: patient, patient: patient,
clinicName: clinicName,
doctorName: doctorName,
episode: episode,
vistDate: vistDate,
doctorImage: doctorImage,
); );
} }
@ -56,6 +72,11 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
String gender; String gender;
int pp; int pp;
PatiantInformtion patient; PatiantInformtion patient;
String clinicName;
String episode;
String doctorName;
String vistDate;
String doctorImage;
_MedicalFileDetailsState( _MedicalFileDetailsState(
{this.age, {this.age,
@ -64,7 +85,12 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
this.gender, this.gender,
this.encounterNumber, this.encounterNumber,
this.pp, this.pp,
this.patient}); this.patient,
this.doctorName,
this.vistDate,
this.clinicName,
this.episode,
this.doctorImage});
bool isPhysicalExam = true; bool isPhysicalExam = true;
bool isProcedureExpand = true; bool isProcedureExpand = true;
bool isHistoryExpand = true; bool isHistoryExpand = true;
@ -78,8 +104,21 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderWhitAppointmentAppBar(
patient, patient.patientType.toString(), patient.arrivedOn), patient: patient,
patientType: patient.patientType.toString() ?? "0",
arrivalType: patient.arrivedOn.toString() ?? 0,
doctorName: doctorName,
profileUrl: doctorImage,
clinic: clinicName,
isPrescriptions: true,
isMedicalFile: true,
episode: episode,
vistDate:
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(
vistDate,
), isArabic: projectViewModel.isArabic)}',
),
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(
@ -105,160 +144,160 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
Container( // Container(
width: double.infinity, // width: double.infinity,
margin: EdgeInsets.only( // margin: EdgeInsets.only(
top: 10, left: 10, right: 10), // top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0), // padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( // decoration: BoxDecoration(
color: Colors.white, // color: Colors.white,
borderRadius: BorderRadius.all( // borderRadius: BorderRadius.all(
Radius.circular(10.0), // Radius.circular(10.0),
), // ),
border: Border.all( // border: Border.all(
color: Colors.grey[200], width: 0.5), // color: Colors.grey[200], width: 0.5),
), // ),
child: Column( // child: Column(
children: [ // children: [
Row( // Row(
children: [ // children: [
if (model.medicalFileList.length != // if (model.medicalFileList.length !=
0 && // 0 &&
model // model
.medicalFileList[0] // .medicalFileList[0]
.entityList[0] // .entityList[0]
.timelines[ // .timelines[
encounterNumber] // encounterNumber]
.timeLineEvents[0] // .timeLineEvents[0]
.consulations // .consulations
.length != // .length !=
0) // 0)
Expanded( // Expanded(
child: AppText( // child: AppText(
model // model
.medicalFileList[0] // .medicalFileList[0]
.entityList[0] // .entityList[0]
.timelines[ // .timelines[
encounterNumber] // encounterNumber]
.timeLineEvents[0] // .timeLineEvents[0]
.consulations[0] // .consulations[0]
.doctorName // .doctorName
.toUpperCase(), // .toUpperCase(),
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
), // ),
], // ],
), // ),
if (model.medicalFileList.length != 0) // if (model.medicalFileList.length != 0)
Row( // Row(
children: [ // children: [
AppText( // AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.clinic + // .clinic +
": ", // ": ",
), // ),
if (model.medicalFileList // if (model.medicalFileList
.length != // .length !=
0 && // 0 &&
model // model
.medicalFileList[0] // .medicalFileList[0]
.entityList[0] // .entityList[0]
.timelines[ // .timelines[
encounterNumber] // encounterNumber]
.timeLineEvents[0] // .timeLineEvents[0]
.consulations // .consulations
.length != // .length !=
0) // 0)
AppText( // AppText(
model // model
.medicalFileList[0] // .medicalFileList[0]
.entityList[0] // .entityList[0]
.timelines[ // .timelines[
encounterNumber] // encounterNumber]
.timeLineEvents[0] // .timeLineEvents[0]
.consulations[0] // .consulations[0]
.clinicName, // .clinicName,
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
], // ],
), // ),
Row( // Row(
children: [ // children: [
AppText( // AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.episode + // .episode +
": ", // ": ",
//fontWeight: FontWeight.w700, // //fontWeight: FontWeight.w700,
), // ),
if (model.medicalFileList.length != // if (model.medicalFileList.length !=
0 && // 0 &&
model // model
.medicalFileList[0] // .medicalFileList[0]
.entityList[0] // .entityList[0]
.timelines[ // .timelines[
encounterNumber] // encounterNumber]
.timeLineEvents[0] // .timeLineEvents[0]
.consulations // .consulations
.length != // .length !=
0) // 0)
AppText( // AppText(
model // model
.medicalFileList[0] // .medicalFileList[0]
.entityList[0] // .entityList[0]
.timelines[encounterNumber] // .timelines[encounterNumber]
.timeLineEvents[0] // .timeLineEvents[0]
.consulations[0] // .consulations[0]
.episodeID // .episodeID
.toString(), // .toString(),
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
], // ],
), // ),
Row( // Row(
children: [ // children: [
AppText( // AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.visitDate + // .visitDate +
": ", // ": ",
//fontWeight: FontWeight.w700, // //fontWeight: FontWeight.w700,
), // ),
if (model.medicalFileList.length != // if (model.medicalFileList.length !=
0 && // 0 &&
model // model
.medicalFileList[0] // .medicalFileList[0]
.entityList[0] // .entityList[0]
.timelines[ // .timelines[
encounterNumber] // encounterNumber]
.timeLineEvents[0] // .timeLineEvents[0]
.consulations // .consulations
.length != // .length !=
0) // 0)
AppText( // AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( // '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(
model // model
.medicalFileList[0] // .medicalFileList[0]
.entityList[0] // .entityList[0]
.timelines[ // .timelines[
encounterNumber] // encounterNumber]
.date, // .date,
), isArabic: projectViewModel.isArabic)}', // ), isArabic: projectViewModel.isArabic)}',
color: Colors.black, // color: Colors.black,
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
fontSize: 14, // fontSize: 14,
), // ),
SizedBox(width: 35.0), // SizedBox(width: 35.0),
// AppText( // // AppText(
// 'Appt Date : ', // // 'Appt Date : ',
// fontWeight: FontWeight.w700, // // fontWeight: FontWeight.w700,
// ), // // ),
// AppText( // // AppText(
// '23/12/2020', // // '23/12/2020',
// ), // // ),
], // ],
), // ),
], // ],
), // ),
), // ),
SizedBox(height: 25.0), SizedBox(height: 25.0),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 &&

@ -110,6 +110,36 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
encounterNumber: index, encounterNumber: index,
pp: patient.patientId, pp: patient.patientId,
patient: patient, patient: patient,
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
clinicName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
doctorImage: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorImage,
episode: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations[0]
.episodeID
.toString(),
vistDate: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date
.toString()
.toString(),
)), )),
); );
}, },

@ -150,6 +150,8 @@ class _InsuranceApprovalScreenNewState
approvalStatus: model.insuranceApproval[index] approvalStatus: model.insuranceApproval[index]
.approvalStatusDescption ?? .approvalStatusDescption ??
'', '',
branch2:
model.insuranceApproval[index].projectName,
), ),
), ),
), ),

@ -148,7 +148,7 @@ class ProcedureCard extends StatelessWidget {
color: Colors.grey, color: Colors.grey,
), ),
Texts( Texts(
entityList.clinicDescription??"", entityList.clinicDescription ?? "",
bold: true, bold: true,
fontSize: 12, fontSize: 12,
), ),

@ -15,8 +15,8 @@ import 'package:provider/provider.dart';
import 'large_avatar.dart'; import 'large_avatar.dart';
class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with PreferredSizeWidget { class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
with PreferredSizeWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
@ -27,6 +27,9 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
final String invoiceNO; final String invoiceNO;
final String orderNo; final String orderNo;
final bool isPrescriptions; final bool isPrescriptions;
final bool isMedicalFile;
final String episode;
final String vistDate;
final String clinic; final String clinic;
PatientProfileHeaderWhitAppointmentAppBar( PatientProfileHeaderWhitAppointmentAppBar(
@ -38,7 +41,12 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
this.appointmentDate, this.appointmentDate,
this.profileUrl, this.profileUrl,
this.invoiceNO, this.invoiceNO,
this.orderNo, this.isPrescriptions = false, this.clinic}); this.orderNo,
this.isPrescriptions = false,
this.clinic,
this.isMedicalFile = false,
this.episode,
this.vistDate});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -51,8 +59,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
} }
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -73,12 +80,12 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
), ),
Expanded( Expanded(
child: AppText( child: AppText(
patient.firstName != null ? patient.firstName != null
(Helpers.capitalize(patient.firstName) + ? (Helpers.capitalize(patient.firstName) +
" " + " " +
Helpers.capitalize( Helpers.capitalize(patient.lastName))
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier *2.2, fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -86,13 +93,13 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
), ),
gender == 1 gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
) )
: Icon( : Icon(
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
]), ]),
), ),
Row(children: [ Row(children: [
@ -114,119 +121,84 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
SERVICES_PATIANT2[ SERVICES_PATIANT2[int.parse(patientType)] ==
int.parse(patientType)] == "patientArrivalList"
"patientArrivalList"
? Container( ? Container(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment children: [
.spaceBetween, patient.patientStatusType == 43
children: [ ? AppText(
patient.patientStatusType == TranslationBase.of(context).arrivedP,
43 color: Colors.green,
? AppText( fontWeight: FontWeight.bold,
TranslationBase.of( fontFamily: 'Poppins',
context) fontSize: 12,
.arrivedP, )
color: Colors.green, : AppText(
fontWeight: TranslationBase.of(context).notArrived,
FontWeight.bold, color: Colors.red[800],
fontFamily: fontWeight: FontWeight.bold,
'Poppins', fontFamily: 'Poppins',
fontSize: 12, fontSize: 12,
) ),
: AppText( arrivalType == '1' || patient.arrivedOn == null
TranslationBase.of( ? AppText(
context) patient.startTime != null
.notArrived, ? patient.startTime
color: : '',
Colors.red[800], fontFamily: 'Poppins',
fontWeight: fontWeight: FontWeight.w600,
FontWeight.bold, )
fontFamily: : AppText(
'Poppins', DateUtils.convertStringToDateFormat(
fontSize: 12, patient.arrivedOn,
), 'MM-dd-yyyy HH:mm'),
arrivalType == '1' || patient.arrivedOn == null fontFamily: 'Poppins',
? AppText( fontWeight: FontWeight.w600,
patient.startTime != )
null ],
? patient ))
.startTime
: '',
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
: AppText(
DateUtils.convertStringToDateFormat(
patient
.arrivedOn,
'MM-dd-yyyy HH:mm'),
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
],
))
: SizedBox(), : SizedBox(),
if (SERVICES_PATIANT2[ if (SERVICES_PATIANT2[int.parse(patientType)] ==
int.parse(patientType)] ==
"List_MyOutPatient") "List_MyOutPatient")
Container( Container(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).appointmentDate +
.appointmentDate +
" : ", " : ",
fontSize: 14, fontSize: 14,
), ),
patient.startTime != null patient.startTime != null
? Container( ? Container(
height: 15, height: 15,
width: 60, width: 60,
decoration: decoration: BoxDecoration(
BoxDecoration( borderRadius: BorderRadius.circular(25),
borderRadius: color: HexColor("#20A169"),
BorderRadius ),
.circular( child: AppText(
25), patient.startTime,
color: HexColor( color: Colors.white,
"#20A169"), fontSize: 1.5 * SizeConfig.textMultiplier,
), textAlign: TextAlign.center,
child: AppText( fontWeight: FontWeight.bold,
patient.startTime, ),
color: Colors.white, )
fontSize: 1.5 *
SizeConfig
.textMultiplier,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
),
)
: SizedBox(), : SizedBox(),
SizedBox( SizedBox(
width: 3.5, width: 3.5,
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient.appointmentDate.toString()?? ''), convertDateFormat2(
fontSize: 1.5 * patient.appointmentDate.toString() ?? ''),
SizeConfig fontSize: 1.5 * SizeConfig.textMultiplier,
.textMultiplier, fontWeight: FontWeight.bold,
fontWeight:
FontWeight.bold,
), ),
), ),
SizedBox( SizedBox(
@ -239,34 +211,23 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
), ),
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(
fontSize: 1.6 * fontSize: 1.6 * SizeConfig.textMultiplier,
SizeConfig
.textMultiplier,
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: text: TranslationBase.of(context).fileNumber,
TranslationBase.of(
context)
.fileNumber,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12, fontFamily: 'Poppins')),
fontFamily:
'Poppins')),
new TextSpan( new TextSpan(
text: patient.patientId text: patient.patientId.toString(),
.toString(),
style: TextStyle( style: TextStyle(
fontWeight: fontWeight: FontWeight.w700,
FontWeight.w700, fontFamily: 'Poppins',
fontFamily:
'Poppins',
fontSize: 14)), fontSize: 14)),
], ],
), ),
@ -274,32 +235,23 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
Row( Row(
children: [ children: [
AppText( AppText(
patient.nationalityName ?? patient.nationalityName ?? patient.nationality,
patient.nationality,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
patient.nationality != null patient.nationality != null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(20.0),
BorderRadius child: Image.network(
.circular( patient.nationalityFlagURL,
20.0), height: 25,
child: Image.network( width: 30,
patient.nationalityFlagURL, errorBuilder: (BuildContext context,
height: 25, Object exception,
width: 30, StackTrace stackTrace) {
errorBuilder: return Text('No Image');
(BuildContext },
context, ))
Object
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
},
))
: SizedBox() : SizedBox()
], ],
) )
@ -309,26 +261,19 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: 1.6 * fontSize: 1.6 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier,
color: Colors.black, color: Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of( text: TranslationBase.of(context).age + " : ",
context) style: TextStyle(fontSize: 14)),
.age +
" : ",
style: TextStyle(
fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight: FontWeight.w700, fontSize: 14)),
FontWeight.w700,
fontSize: 14)),
], ],
), ),
), ),
@ -343,14 +288,16 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
Container( Container(
width: 30, width: 30,
height: 30, height: 30,
margin: EdgeInsets.only(left: projectViewModel.isArabic?10:85, right: projectViewModel.isArabic?85:10,top: 5), margin: EdgeInsets.only(
left: projectViewModel.isArabic ? 10 : 85,
right: projectViewModel.isArabic ? 85 : 10,
top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border( border: Border(
bottom:BorderSide(color: Colors.grey[400],width: 2.5), bottom: BorderSide(color: Colors.grey[400], width: 2.5),
left: BorderSide(color: Colors.grey[400],width: 2.5), left: BorderSide(color: Colors.grey[400], width: 2.5),
) )),
),
), ),
Expanded( Expanded(
child: Container( child: Container(
@ -380,79 +327,81 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 12,
), ),
if (orderNo != null ) if (orderNo != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts('Order No: ',
'Order No: ', color: Colors.grey[800],
color: Colors.grey[800], fontSize: 12),
fontSize: 12 Texts(orderNo ?? '', fontSize: 12)
),
Texts(
orderNo ?? '',fontSize: 12
)
], ],
), ),
if (invoiceNO != null ) if (invoiceNO != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts('Invoice: ',
'Invoice: ', color: Colors.grey[800],
color: Colors.grey[800], fontSize: 12),
fontSize: 12 Texts(invoiceNO, fontSize: 12)
),
Texts(
invoiceNO,
fontSize: 12
)
], ],
), ),
if( branch!=null) if (branch != null)
Row( Row(
children: [ children: [
Texts( Texts('Branch: ',
'Branch: ', color: Colors.grey[800],
color: Colors.grey[800], fontSize: 12),
fontSize: 12 Texts(branch ?? '', fontSize: 12)
),
Texts(
branch?? '',
fontSize: 12
)
], ],
), ),
if(clinic!=null) if (isPrescriptions)
if (clinic != null)
Row(
children: [
Texts('Clinic: ',
color: Colors.grey[800],
fontSize: 12),
Texts(clinic ?? '', fontSize: 12)
],
),
if (isMedicalFile && episode != null)
Row( Row(
children: [ children: [
Texts( Texts('Episode: ',
'Clinic: ', color: Colors.grey[800],
color: Colors.grey[800], fontSize: 12),
fontSize: 12 Texts(episode ?? '', fontSize: 12)
), ],
Texts( ),
clinic?? '', if (isMedicalFile && vistDate != null)
fontSize: 12 Row(
) children: [
Texts('Visit Date: ',
color: Colors.grey[800],
fontSize: 12),
Texts(vistDate ?? '', fontSize: 12)
], ],
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Texts( child: Texts(
!isPrescriptions? 'Result Date: ': 'Prescriptions Date ', !isPrescriptions
? 'Result Date: '
: 'Prescriptions Date ',
color: Colors.grey[800], color: Colors.grey[800],
fontSize: 12, fontSize: 12,
), ),
), ),
Texts( Texts(
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14, '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
fontSize: 14,
) )
], ],
) )
]), ]),
), ),
), ),
], ],
), ),
), ),
@ -466,7 +415,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String newDate =""; String newDate = "";
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
@ -477,10 +426,10 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
} }
return newDate.toString(); return newDate.toString();
@ -504,5 +453,5 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
} }
@override @override
Size get preferredSize => Size(double.maxFinite,290); Size get preferredSize => Size(double.maxFinite, 290);
} }

@ -19,6 +19,7 @@ class DoctorCardInsurance extends StatelessWidget {
final String clinic; final String clinic;
final String approvalStatus; final String approvalStatus;
final String patientOut; final String patientOut;
final String branch2;
DoctorCardInsurance( DoctorCardInsurance(
{this.doctorName, {this.doctorName,
@ -31,7 +32,8 @@ class DoctorCardInsurance extends StatelessWidget {
this.isPrescriptions = false, this.isPrescriptions = false,
this.clinic, this.clinic,
this.approvalStatus, this.approvalStatus,
this.patientOut}); this.patientOut,
this.branch2});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -108,7 +110,7 @@ class DoctorCardInsurance extends StatelessWidget {
], ],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
child: LargeAvatar( child: LargeAvatar(
@ -161,23 +163,38 @@ class DoctorCardInsurance extends StatelessWidget {
child: Texts( child: Texts(
clinic, clinic,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 15.0,
), ),
) )
], ],
), ),
if (branch != null) if (branch2 != null)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
'Approval No: ', 'Branch:',
//color: Colors.grey[500], //color: Colors.grey[500],
), ),
Texts( Texts(
branch, branch2,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 15.0,
) )
], ],
) ),
Row(
children: <Widget>[
Texts(
'Approval No: ',
//color: Colors.grey[500],
),
Texts(
branch,
fontWeight: FontWeight.w700,
fontSize: 15.0,
)
],
),
]), ]),
), ),
), ),

Loading…
Cancel
Save