diff --git a/assets/images/type-booked.png b/assets/images/type-booked.png new file mode 100644 index 00000000..c42945cf Binary files /dev/null and b/assets/images/type-booked.png differ diff --git a/assets/images/type-livecare.png b/assets/images/type-livecare.png new file mode 100644 index 00000000..05f3d213 Binary files /dev/null and b/assets/images/type-livecare.png differ diff --git a/assets/images/type-walkin.png b/assets/images/type-walkin.png new file mode 100644 index 00000000..555023b3 Binary files /dev/null and b/assets/images/type-walkin.png differ diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 7b54af8a..dc3c8b4e 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -55,6 +55,7 @@ class PatiantInformtion { String visitType; String nationalityFlagURL; int patientStatusType; + int visitTypeId; PatiantInformtion( {this.list, this.projectId, @@ -109,7 +110,8 @@ class PatiantInformtion { this.patientMRN, this.visitType, this.nationalityFlagURL, - this.patientStatusType}); + this.patientStatusType, + this.visitTypeId}); factory PatiantInformtion.fromJson(Map json) => PatiantInformtion( @@ -177,5 +179,6 @@ class PatiantInformtion { nationalityFlagURL: json['NationalityFlagURL'] ?? json['NationalityFlagURL'], patientStatusType: - json['patientStatusType'] ?? json['patientStatusType']); + json['patientStatusType'] ?? json['patientStatusType'], + visitTypeId: json['visitTypeId'] ?? json['visitTypeId']); } diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index 93a176ea..a7e058ac 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -36,7 +36,7 @@ class PatientCard extends StatelessWidget { ), child: Stack(children: [ Container( - height: MediaQuery.of(context).size.height * .17, + height: MediaQuery.of(context).size.height * .20, width: 5, decoration: BoxDecoration( borderRadius: BorderRadius.only( @@ -47,7 +47,7 @@ class PatientCard extends StatelessWidget { : Colors.red[800], )), Container( - padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + padding: EdgeInsets.only(left: 10, right: 0, bottom: 0), child: InkWell( child: Column( children: [ @@ -153,16 +153,6 @@ class PatientCard extends StatelessWidget { Padding( padding: EdgeInsets.only(left: 12.0), child: Container( - // decoration: BoxDecoration( - // boxShadow: [ - // // BoxShadow( - // // color: Color.fromRGBO(0, 0, 0, 0.08), - // // offset: Offset(0.0, 5.0), - // // blurRadius: 16.0) - // // ], - // // borderRadius: BorderRadius.all(Radius.circular(35.0)), - // // color: Color(0xffCCCCCC), - // ), width: 60, height: 60, child: Image.asset( @@ -283,79 +273,39 @@ class PatientCard extends StatelessWidget { ) ])) ]), + SERVICES_PATIANT2[int.parse(patientType)] == + "patientArrivalList" + ? Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + bottomRight: Radius.circular(8), + topLeft: Radius.circular(8), + ), + color: Colors.red, + ), + child: Image.asset( + patientInfo.appointmentType == + 'Regular' && + patientInfo.visitTypeId == 100 + ? 'assets/images/type-livecare.png' + : patientInfo.appointmentType == + 'Walkin' + ? 'assets/images/type-walkin.png' + : 'assets/images/type-booked.png', + height: 25, + width: 35, + )), + ]) + : SizedBox() ], ), onTap: onTap, - )) + )), ])); - - // ]), - // TableRow(children: [ - // SizedBox( - // height: 5, - // ), - // SizedBox( - // height: 5, - // ) - // ]), - // TableRow(children: [ - // Container( - // child: RichText( - // text: new TextSpan( - // style: new TextStyle( - // fontSize: 2.0 * SizeConfig.textMultiplier, - // color: Colors.black), - // children: [ - // new TextSpan( - // text: TranslationBase.of(context) - // .nationality + - // " : ", - // style: TextStyle( - // fontWeight: FontWeight.w700, - // fontSize: 2.2 * - // SizeConfig.textMultiplier)), - // // , - // ], - // ), - // ), - // ), - // Container( - // child: RichText( - // text: new TextSpan( - // style: new TextStyle( - // fontSize: 2.0 * SizeConfig.textMultiplier, - // color: Colors.black), - // children: [ - // new TextSpan( - // text: - // TranslationBase.of(context).gender + - // " : ", - // style: TextStyle( - // fontWeight: FontWeight.w700, - // )), - // new TextSpan( - // text: - // patientInfo.gender.toString() == '1' - // ? 'Male' - // : 'Female'), - // ], - // ), - // ), - // ), - // ]), - // ], - //), - - // ), - - // Divider(color: Colors.grey) - //], - //), - //], - //), - // onTap: onTap, - // ), - //); } convertDateFormat2(String str) {