diff --git a/lib/models/patient/get_pending_patient_er_model.dart b/lib/models/patient/get_pending_patient_er_model.dart new file mode 100644 index 00000000..e1b50a81 --- /dev/null +++ b/lib/models/patient/get_pending_patient_er_model.dart @@ -0,0 +1,183 @@ +/* + *@author: Amjad Amireh + *@Date:15/6/2020 + *@param: + *@return: + *@desc: Find list of pending patients Model + */ +import 'dart:convert'; + +ListPendingPatientListModel listPendingPatientListModelFromJson(String str) => ListPendingPatientListModel.fromJson(json.decode(str)); + +String listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson()); + +class ListPendingPatientListModel { + ListPendingPatientListModel({ + this.acceptedBy, + this.acceptedOn, + this.age, + this.appointmentNo, + this.arrivalTime, + this.arrivalTimeD, + this.callStatus, + this.clientRequestId, + this.clinicName, + this.consoltationEnd, + this.consultationNotes, + this.createdOn, + this.dateOfBirth, + this.deviceToken, + this.deviceType, + this.doctorName, + this.editOn, + this.gender, + this.isFollowUp, + this.isFromVida, + this.isLoginB, + this.isOutKsa, + this.isRejected, + this.language, + this.latitude, + this.longitude, + this.mobileNumber, + this.openSession, + this.openTokenId, + this.patientId, + this.patientName, + this.patientStatus, + this.preferredLanguage, + this.projectId, + this.scoring, + this.serviceId, + this.tokenId, + this.vcId, + this.voipToken, + }); + + dynamic acceptedBy; + dynamic acceptedOn; + int age; + dynamic appointmentNo; + String arrivalTime; + String arrivalTimeD; + int callStatus; + String clientRequestId; + String clinicName; + dynamic consoltationEnd; + dynamic consultationNotes; + dynamic createdOn; + DateTime dateOfBirth; + String deviceToken; + String deviceType; + dynamic doctorName; + String editOn; + String gender; + bool isFollowUp; + dynamic isFromVida; + int isLoginB; + bool isOutKsa; + int isRejected; + String language; + double latitude; + double longitude; + String mobileNumber; + dynamic openSession; + dynamic openTokenId; + String patientId; + String patientName; + int patientStatus; + String preferredLanguage; + int projectId; + int scoring; + int serviceId; + dynamic tokenId; + int vcId; + String voipToken; + + factory ListPendingPatientListModel.fromJson(Map json) => ListPendingPatientListModel( + acceptedBy: json["AcceptedBy"], + acceptedOn: json["AcceptedOn"], + age: json["Age"], + appointmentNo: json["AppointmentNo"], + arrivalTime: json["ArrivalTime"], + arrivalTimeD: json["ArrivalTimeD"], + callStatus: json["CallStatus"], + clientRequestId: json["ClientRequestID"], + clinicName: json["ClinicName"], + consoltationEnd: json["ConsoltationEnd"], + consultationNotes: json["ConsultationNotes"], + createdOn: json["CreatedOn"], + dateOfBirth: DateTime.parse(json["DateOfBirth"]), + deviceToken: json["DeviceToken"], + deviceType: json["DeviceType"], + doctorName: json["DoctorName"], + editOn: json["EditOn"], + gender: json["Gender"], + isFollowUp: json["IsFollowUP"], + isFromVida: json["IsFromVida"], + isLoginB: json["IsLoginB"], + isOutKsa: json["IsOutKSA"], + isRejected: json["IsRejected"], + language: json["Language"], + latitude: json["Latitude"].toDouble(), + longitude: json["Longitude"].toDouble(), + mobileNumber: json["MobileNumber"], + openSession: json["OpenSession"], + openTokenId: json["OpenTokenID"], + patientId: json["PatientID"], + patientName: json["PatientName"], + patientStatus: json["PatientStatus"], + preferredLanguage: json["PreferredLanguage"], + projectId: json["ProjectID"], + scoring: json["Scoring"], + serviceId: json["ServiceID"], + tokenId: json["TokenID"], + vcId: json["VC_ID"], + voipToken: json["VoipToken"], + ); + + Map toJson() => { + "AcceptedBy": acceptedBy, + "AcceptedOn": acceptedOn, + "Age": age, + "AppointmentNo": appointmentNo, + "ArrivalTime": arrivalTime, + "ArrivalTimeD": arrivalTimeD, + "CallStatus": callStatus, + "ClientRequestID": clientRequestId, + "ClinicName": clinicName, + "ConsoltationEnd": consoltationEnd, + "ConsultationNotes": consultationNotes, + "CreatedOn": createdOn, + "DateOfBirth": "${dateOfBirth.year.toString().padLeft(4, '0')}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}", + "DeviceToken": deviceToken, + "DeviceType": deviceType, + "DoctorName": doctorName, + "EditOn": editOn, + "Gender": gender, + "IsFollowUP": isFollowUp, + "IsFromVida": isFromVida, + "IsLoginB": isLoginB, + "IsOutKSA": isOutKsa, + "IsRejected": isRejected, + "Language": language, + "Latitude": latitude, + "Longitude": longitude, + "MobileNumber": mobileNumber, + "OpenSession": openSession, + "OpenTokenID": openTokenId, + "PatientID": patientId, + "PatientName": patientName, + "PatientStatus": patientStatus, + "PreferredLanguage": preferredLanguage, + "ProjectID": projectId, + "Scoring": scoring, + "ServiceID": serviceId, + "TokenID": tokenId, + "VC_ID": vcId, + "VoipToken": voipToken, + }; +} +// To parse this JSON data, do +// +// final listPendingPatientListModel = listPendingPatientListModelFromJson(jsonString); diff --git a/lib/providers/pending_patient_provider.dart b/lib/providers/pending_patient_provider.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 96211046..6cb47cd2 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -22,6 +22,7 @@ import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:doctor_app_flutter/presentation/doctor_app_icons.dart'; import '../../config/size_config.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -383,23 +384,29 @@ class _PatientsScreenState extends State { mainAxisAlignment: MainAxisAlignment .start, - children: - item.genderDescription == - "Male" - ? [ - SvgPicture.asset( - url + avatarMale, - height: 80.0, - width: 80.0, - semanticsLabel: 'Male Logo') - ] - : [ - SvgPicture.asset( - url + avatarFemale, - height: 80.0, - width: 80.0, - semanticsLabel: 'Female Logo') - ], + children: [ + Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment(-1, -1), + end: Alignment(1, 1), + colors: [ + Colors.grey[100], + Colors.grey[200], + ]), + boxShadow: [ + BoxShadow( + color: Color.fromRGBO(0, 0, 0, 0.08), + offset: Offset(0.0, 5.0), + blurRadius: 16.0) + ], + borderRadius: BorderRadius.all(Radius.circular(50.0)), + ), + width: 80, + height: 80, + child: Icon(item.genderDescription == "Male" ? DoctorApp.male : DoctorApp.femaleicon,size: 80,)), + + ], ), SizedBox( width: 10,