Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into development

merge-requests/574/head
mosazaid 5 years ago
commit 5003b3a001

@ -240,6 +240,8 @@ const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults";
const GET_MY_REFERRAL_INPATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralPatient";
const GET_MY_DISCHARGE_PATIENT = "/Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus";

@ -0,0 +1,216 @@
class DischargeReferralPatient {
dynamic rowID;
int projectID;
int lineItemNo;
int doctorID;
int patientID;
String doctorName;
dynamic doctorNameN;
String firstName;
String middleName;
String lastName;
dynamic firstNameN;
dynamic middleNameN;
dynamic lastNameN;
int gender;
String dateofBirth;
String mobileNumber;
String emailAddress;
String patientIdentificationNo;
int patientType;
String admissionNo;
String admissionDate;
String roomID;
String bedID;
dynamic nursingStationID;
dynamic description;
String nationalityName;
dynamic nationalityNameN;
int referralDoctor;
int referringDoctor;
int referralClinic;
int referringClinic;
int referralStatus;
String referralDate;
String referringDoctorRemarks;
String referredDoctorRemarks;
String referralResponseOn;
int priority;
int frequency;
String mAXResponseTime;
String dischargeDate;
dynamic clinicID;
String age;
String clinicDescription;
String frequencyDescription;
String genderDescription;
bool isDoctorLate;
bool isDoctorResponse;
String nursingStationName;
String priorityDescription;
String referringClinicDescription;
String referringDoctorName;
DischargeReferralPatient(
{this.rowID,
this.projectID,
this.lineItemNo,
this.doctorID,
this.patientID,
this.doctorName,
this.doctorNameN,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.gender,
this.dateofBirth,
this.mobileNumber,
this.emailAddress,
this.patientIdentificationNo,
this.patientType,
this.admissionNo,
this.admissionDate,
this.roomID,
this.bedID,
this.nursingStationID,
this.description,
this.nationalityName,
this.nationalityNameN,
this.referralDoctor,
this.referringDoctor,
this.referralClinic,
this.referringClinic,
this.referralStatus,
this.referralDate,
this.referringDoctorRemarks,
this.referredDoctorRemarks,
this.referralResponseOn,
this.priority,
this.frequency,
this.mAXResponseTime,
this.dischargeDate,
this.clinicID,
this.age,
this.clinicDescription,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName});
DischargeReferralPatient.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
projectID = json['ProjectID'];
lineItemNo = json['LineItemNo'];
doctorID = json['DoctorID'];
patientID = json['PatientID'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
firstName = json['FirstName'];
middleName = json['MiddleName'];
lastName = json['LastName'];
firstNameN = json['FirstNameN'];
middleNameN = json['MiddleNameN'];
lastNameN = json['LastNameN'];
gender = json['Gender'];
dateofBirth = json['DateofBirth'];
mobileNumber = json['MobileNumber'];
emailAddress = json['EmailAddress'];
patientIdentificationNo = json['PatientIdentificationNo'];
patientType = json['PatientType'];
admissionNo = json['AdmissionNo'];
admissionDate = json['AdmissionDate'];
roomID = json['RoomID'];
bedID = json['BedID'];
nursingStationID = json['NursingStationID'];
description = json['Description'];
nationalityName = json['NationalityName'];
nationalityNameN = json['NationalityNameN'];
referralDoctor = json['ReferralDoctor'];
referringDoctor = json['ReferringDoctor'];
referralClinic = json['ReferralClinic'];
referringClinic = json['ReferringClinic'];
referralStatus = json['ReferralStatus'];
referralDate = json['ReferralDate'];
referringDoctorRemarks = json['ReferringDoctorRemarks'];
referredDoctorRemarks = json['ReferredDoctorRemarks'];
referralResponseOn = json['ReferralResponseOn'];
priority = json['Priority'];
frequency = json['Frequency'];
mAXResponseTime = json['MAXResponseTime'];
dischargeDate = json['DischargeDate'];
clinicID = json['ClinicID'];
age = json['Age'];
clinicDescription = json['ClinicDescription'];
frequencyDescription = json['FrequencyDescription'];
genderDescription = json['GenderDescription'];
isDoctorLate = json['IsDoctorLate'];
isDoctorResponse = json['IsDoctorResponse'];
nursingStationName = json['NursingStationName'];
priorityDescription = json['PriorityDescription'];
referringClinicDescription = json['ReferringClinicDescription'];
referringDoctorName = json['ReferringDoctorName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RowID'] = this.rowID;
data['ProjectID'] = this.projectID;
data['LineItemNo'] = this.lineItemNo;
data['DoctorID'] = this.doctorID;
data['PatientID'] = this.patientID;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['FirstNameN'] = this.firstNameN;
data['MiddleNameN'] = this.middleNameN;
data['LastNameN'] = this.lastNameN;
data['Gender'] = this.gender;
data['DateofBirth'] = this.dateofBirth;
data['MobileNumber'] = this.mobileNumber;
data['EmailAddress'] = this.emailAddress;
data['PatientIdentificationNo'] = this.patientIdentificationNo;
data['PatientType'] = this.patientType;
data['AdmissionNo'] = this.admissionNo;
data['AdmissionDate'] = this.admissionDate;
data['RoomID'] = this.roomID;
data['BedID'] = this.bedID;
data['NursingStationID'] = this.nursingStationID;
data['Description'] = this.description;
data['NationalityName'] = this.nationalityName;
data['NationalityNameN'] = this.nationalityNameN;
data['ReferralDoctor'] = this.referralDoctor;
data['ReferringDoctor'] = this.referringDoctor;
data['ReferralClinic'] = this.referralClinic;
data['ReferringClinic'] = this.referringClinic;
data['ReferralStatus'] = this.referralStatus;
data['ReferralDate'] = this.referralDate;
data['ReferringDoctorRemarks'] = this.referringDoctorRemarks;
data['ReferredDoctorRemarks'] = this.referredDoctorRemarks;
data['ReferralResponseOn'] = this.referralResponseOn;
data['Priority'] = this.priority;
data['Frequency'] = this.frequency;
data['MAXResponseTime'] = this.mAXResponseTime;
data['DischargeDate'] = this.dischargeDate;
data['ClinicID'] = this.clinicID;
data['Age'] = this.age;
data['ClinicDescription'] = this.clinicDescription;
data['FrequencyDescription'] = this.frequencyDescription;
data['GenderDescription'] = this.genderDescription;
data['IsDoctorLate'] = this.isDoctorLate;
data['IsDoctorResponse'] = this.isDoctorResponse;
data['NursingStationName'] = this.nursingStationName;
data['PriorityDescription'] = this.priorityDescription;
data['ReferringClinicDescription'] = this.referringClinicDescription;
data['ReferringDoctorName'] = this.referringDoctorName;
return data;
}
}

@ -0,0 +1,76 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class DischargedPatientService extends BaseService {
List<PatiantInformtion> myDischargedPatients = List();
List<DischargeReferralPatient> myDischargeReferralPatients = List();
Future getDischargedPatient() async {
hasError = false;
Map<String, dynamic> body = Map();
await getDoctorProfile();
body['DoctorID'] = doctorProfile.doctorID;
body['FirstName'] = "0";
body['MiddleName'] = "0";
body['LastName'] = "0";
body['PatientMobileNumber'] = "0";
body['PatientIdentificationID'] = "0";
body['PatientID'] = 0;
body['From'] = "0";
body['To'] = "0";
body['stamp'] = DateTime.now().toIso8601String();
body['IsLoginForDoctorApp'] = true;
body['IPAdress'] = "11.11.11.11";
body['PatientOutSA'] = false;
body['PatientTypeID'] = 1;
hasError = false;
myDischargedPatients.clear();
await baseAppClient.post(GET_MY_DISCHARGE_PATIENT,
onSuccess: (dynamic response, int statusCode) {
if (response['List_MyDischargePatient'] != null) {
response['List_MyDischargePatient'].forEach((v) {
myDischargedPatients.add(PatiantInformtion.fromJson(v));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future gtMyDischargeReferralPatient() async {
hasError = false;
Map<String, dynamic> body = Map();
await getDoctorProfile();
body['DoctorID'] = doctorProfile.doctorID;
body['FirstName'] = "0";
body['MiddleName'] = "0";
body['LastName'] = "0";
body['PatientMobileNumber'] = "0";
body['PatientIdentificationID'] = "0";
body['PatientID'] = 0;
body['From'] = "0";
body['To'] = "0";
body['stamp'] = DateTime.now().toIso8601String();
body['IsLoginForDoctorApp'] = true;
body['IPAdress'] = "11.11.11.11";
body['PatientOutSA'] = false;
body['PatientTypeID'] = 1;
hasError = false;
myDischargeReferralPatients.clear();
await baseAppClient.post(GET_MY_DISCHARGE_PATIENT,
onSuccess: (dynamic response, int statusCode) {
if (response['List_MyDischargeReferralPatient'] != null) {
response['List_MyDischargeReferralPatient'].forEach((v) {
myDischargeReferralPatients.add(DischargeReferralPatient.fromJson(v));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -19,7 +19,7 @@ class MyReferralInPatientService extends BaseService {
body['PatientID'] = 0;
body['From'] = "0";
body['To'] = "0";
body['stamp'] = "2021-04-23T15:03:34.189Z";//DateTime.now().toIso8601String();
body['stamp'] = DateTime.now().toIso8601String();
body['IsLoginForDoctorApp'] = true;
body['IPAdress'] = "11.11.11.11";
body['PatientOutSA'] = false;

@ -3,7 +3,6 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart';
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
class ReferralPatientService extends BaseService {
@ -11,9 +10,6 @@ class ReferralPatientService extends BaseService {
List<MyReferralPatientModel> get listMyReferralPatientModel => _listMyReferralPatientModel;
Helpers helpers = Helpers();
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();

@ -0,0 +1,69 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart';
import 'package:doctor_app_flutter/core/service/DischargedPatientService.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class DischargedPatientViewModel extends BaseViewModel {
DischargedPatientService _dischargedPatientService =
locator<DischargedPatientService>();
List<PatiantInformtion> get myDischargedPatient =>
_dischargedPatientService.myDischargedPatients;
List<DischargeReferralPatient> get myDischargeReferralPatient =>
_dischargedPatientService.myDischargeReferralPatients;
List<PatiantInformtion> filterData = [];
searchData(String str) {
// this.responseModelList = this.responseModelList2;
// var strExist = str.length > 0 ? true : false;
// if (strExist) {
// List<PatiantInformtion> filterData = [];
//
// for (var i = 0; i < responseModelList2.length; i++) {
// String firstName = responseModelList[i].firstName.toUpperCase();
// String lastName = responseModelList[i].lastName.toUpperCase();
// String mobile = responseModelList[i].mobileNumber.toUpperCase();
// String patientID = responseModelList[i].patientId.toString();
//
// if (firstName.contains(str.toUpperCase()) ||
// lastName.contains(str.toUpperCase()) ||
// mobile.contains(str) ||
// patientID.contains(str)) {
// filterData.add(responseModelList[i]);
// }
// }
//
// // setState(() {
// // this.responseModelList = filterData;
// // });
// } else {
// filterData = myDischargedPatient;
// notifyListeners();
// }
}
Future getDischargedPatient() async {
setState(ViewState.Busy);
await _dischargedPatientService.getDischargedPatient();
if (_dischargedPatientService.hasError) {
error = _dischargedPatientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future gtMyDischargeReferralPatient() async {
setState(ViewState.Busy);
await _dischargedPatientService.gtMyDischargeReferralPatient();
if (_dischargedPatientService.hasError) {
error = _dischargedPatientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -14,6 +14,7 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:get_it/get_it.dart';
import 'core/service/DischargedPatientService.dart';
import 'core/service/InsuranceCardService.dart';
import 'core/service/MyReferralPatientService.dart';
import 'core/service/PatientMuseService.dart';
@ -31,6 +32,7 @@ import 'core/service/radiology_service.dart';
import 'core/service/referral_patient_service.dart';
import 'core/service/referred_patient_service.dart';
import 'core/service/schedule_service.dart';
import 'core/viewModel/DischargedPatientViewModel.dart';
import 'core/viewModel/InsuranceViewModel.dart';
import 'core/viewModel/PatientMuseViewModel.dart';
import 'core/viewModel/SOAP_view_model.dart';
@ -76,6 +78,7 @@ void setupLocator() {
locator.registerLazySingleton(() => PrescriptionsService());
locator.registerLazySingleton(() => ReferralService());
locator.registerLazySingleton(() => MyReferralInPatientService());
locator.registerLazySingleton(() => DischargedPatientService());
/// View Model
locator.registerFactory(() => DoctorReplayViewModel());
@ -100,4 +103,5 @@ void setupLocator() {
locator.registerFactory(() => InsuranceViewModel());
locator.registerFactory(() => RadiologyViewModel());
locator.registerFactory(() => PrescriptionsViewModel());
locator.registerFactory(() => DischargedPatientViewModel());
}

@ -11,8 +11,8 @@ class PatiantInformtion {
String arrivedOn;
int clinicGroupId;
String companyName;
Null dischargeStatus;
Null doctorDetails;
dynamic dischargeStatus;
dynamic doctorDetails;
int doctorId;
String endTime;
int episodeNo;
@ -60,6 +60,7 @@ class PatiantInformtion {
int patientStatusType;
int visitTypeId;
String startTimes;
String dischargeDate;
PatiantInformtion(
{this.patientDetails,
this.projectId,
@ -119,7 +120,7 @@ class PatiantInformtion {
this.nationalityFlagURL,
this.patientStatusType,
this.visitTypeId,
this.startTimes});
this.startTimes,this.dischargeDate});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
PatiantInformtion(
@ -176,7 +177,7 @@ class PatiantInformtion {
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'],
appointmentTypeId: json['appointmentTypeId']?? json['appointmentTypeid'],
arrivedOn: json['arrivedOn'] ?? json['ArrivedOn'],
arrivedOn: json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn'],
clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'],
dischargeStatus: json['dischargeStatus'],
@ -195,5 +196,6 @@ class PatiantInformtion {
json['patientStatusType'] ?? json['PatientStatusType'],
visitTypeId: json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'],
startTimes: json['StartTime'] ?? json['StartTime'],
dischargeDate: json['DischargeDate'] ,
);
}

@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medicine/search_medicine_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/DischargedPatientPage.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
@ -623,6 +624,45 @@ class _HomeScreenState extends State<HomeScreen> {
);
},
),
HomePageCard(
color: Colors.red[800],
margin: EdgeInsets.all(5),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
top: 10, left: 10, right: 0),
child: Icon(
DoctorApp.referral_1,
size: 35,
color: Colors.white,
)),
Container(
padding: EdgeInsets.all(10),
child: AppText(
'DischargedPatient',
color: Colors.white,
textAlign: TextAlign.start,
fontSize: 15,
))
],
),
hasBorder: false,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
DischargedPatient(),
// MyReferredPatient(),
),
);
},
),
])),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -85,80 +85,103 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age is String
? patient.age ?? ""
: "${patient.age}",
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName
: "",
clinicName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName
: "",
doctorImage: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorImage
: "",
episode: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty
? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString()
: "",
vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString())),
);
if (model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.length !=
0)
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age is String
? patient.age ?? ""
: "${patient.age}",
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName
: "",
clinicName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName
: "",
doctorImage: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.isNotEmpty
? model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorImage
: "",
episode: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty
? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString()
: "",
vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString())),
);
},
child: DoctorCard(
doctorName: model.medicalFileList[0]
.entityList[0].timelines[index].doctorName,
clinic: model.medicalFileList[0].entityList[0]
.timelines[index].clinicName,
branch: model.medicalFileList[0].entityList[0]
.timelines[index].projectName,
profileUrl: model.medicalFileList[0]
.entityList[0].timelines[index].doctorImage,
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),
isPrescriptions: true,
),
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
clinic: model.medicalFileList[0].entityList[0]
.timelines[index].clinicName,
branch: model.medicalFileList[0].entityList[0]
.timelines[index].projectName,
profileUrl: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorImage,
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),
isPrescriptions: true,
isShowEye: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.length !=
0
? true
: false),
);
})
: Center(

@ -0,0 +1,318 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/DischargedPatientViewModel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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/text_fields/app_text_form_field.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../routes.dart';
class DischargedPatient extends StatefulWidget {
@override
_DischargedPatientState createState() => _DischargedPatientState();
}
class _DischargedPatientState extends State<DischargedPatient> {
final _controller = TextEditingController();
@override
Widget build(BuildContext context) {
return BaseView<DischargedPatientViewModel>(
onModelReady: (model) => model.getDischargedPatient(),
builder: (_, model, w) => AppScaffold(
appBarTitle: 'Discharged Patient',
backgroundColor: Colors.grey[200],
isShowAppBar: true,
baseViewModel: model,
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 12,),
Container(
width: double.maxFinite,
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: Color(0xffCCCCCC),
),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
left: 10, top: 10),
child: AppText(
TranslationBase.of(
context)
.searchPatientName,
fontSize: 13,
)),
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
padding:
EdgeInsets.only(
bottom: 30),
),
onChanged: (String str) {
//this.searchData(str);
}),
])),
...List.generate(
model.myDischargedPatient.length,
(index) => InkWell(
onTap: () {
Navigator.of(context)
.pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": model.myDischargedPatient[index],
"patientType": "1",
"isSearch": false,
"isInpatient":true,
"isDischargedPatient":true
});
},
child: Container(
width: double.maxFinite,
margin: EdgeInsets.all(8),
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(children: [
Container(
width: 170,
child: AppText(
(Helpers.capitalize(model
.myDischargedPatient[index]
.firstName) +
" " +
Helpers.capitalize(model
.myDischargedPatient[index]
.lastName)),
fontSize: 16,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
textOverflow: TextOverflow.ellipsis,
),
),
model.myDischargedPatient[index].gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
Row(
children: [
AppText(
model.myDischargedPatient[index].nationalityName != null
? model.myDischargedPatient[index].nationalityName.trim()
: model.myDischargedPatient[index].nationality != null
? model.myDischargedPatient[index].nationality.trim()
: model.myDischargedPatient[index].nationalityId != null
? model.myDischargedPatient[index].nationalityId
: "",
fontWeight: FontWeight.bold,
fontSize: 14,
textOverflow: TextOverflow.ellipsis,
),
model.myDischargedPatient[index]
.nationality !=
null ||
model.myDischargedPatient[index]
.nationalityId !=
null
? ClipRRect(
borderRadius:
BorderRadius.circular(20.0),
child: Image.network(
model.myDischargedPatient[index].nationalityFlagURL != null ?
model.myDischargedPatient[index].nationalityFlagURL
: '',
height: 25,
width: 30,
errorBuilder:
(BuildContext context,
Object exception,
StackTrace stackTrace) {
return AppText(
'',
fontSize: 10,
);
},
))
: SizedBox()
],
)
],
)),
Row(
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Container(
width: 60,
height: 60,
child: Image.asset(
model.myDischargedPatient[index].gender ==
1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
),
),
],
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.fileNumber,
style: TextStyle(
fontSize: 14,
fontFamily: 'Poppins')),
new TextSpan(
text: model
.myDischargedPatient[index]
.patientId
.toString(),
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
),
),
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: model.myDischargedPatient[index].admissionDate == null ? "" :
TranslationBase.of(context).admissionDate + " : ",
style: TextStyle(fontSize: 14)),
new TextSpan(
text: model.myDischargedPatient[index].admissionDate == null ? ""
: "${DateUtils.convertDateFromServerFormat(model.myDischargedPatient[index].admissionDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 15)),
],
),
),
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: model.myDischargedPatient[index].dischargeDate == null ? ""
: "Discharge Date : ",
style: TextStyle(fontSize: 14)),
new TextSpan(
text: model.myDischargedPatient[index].dischargeDate == null ? ""
: "${DateUtils.convertDateFromServerFormat(model.myDischargedPatient[index].dischargeDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 15)),
],
),
),
),
Row(
children: [
AppText(
"${TranslationBase.of(context).numOfDays}: ",
fontSize: 14,fontWeight: FontWeight.w300,
),
AppText(
"${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(model.myDischargedPatient[index].admissionDate)).inDays + 1}",
fontSize: 15,
fontWeight: FontWeight.w700),
],
),
],
),
)
],
)
],
),
),
),
)
],
),
),
),
),
);
}
}

@ -630,6 +630,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
'Exp on: ',
color: Colors.grey[500],
),
if(model.insuranceApproval[indexInsurance].expiryDate!=null)
AppText(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}',
color: Colors.black,

@ -39,6 +39,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
var filteredNotesList;
final _controller = TextEditingController();
var _isInit = true;
bool isDischargedPatient = false;
AuthViewModel authProvider;
@ -68,6 +69,8 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType'];
if(routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<PatientViewModel>(
onModelReady: (model) => getProgressNoteList(context, model),
builder: (_, model, w) => AppScaffold(
@ -83,6 +86,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
color: Colors.grey[200],
child: Column(
children: <Widget>[
if(!isDischargedPatient)
AddNewOrder( onTap: () {
Navigator.push(
context,

@ -27,6 +27,7 @@ class PatientProfileScreen extends StatelessWidget {
PatiantInformtion patient;
bool isFromSearch = false;
bool isInpatient = false;
bool isDischargedPatient = false;
@override
Widget build(BuildContext context) {
@ -44,6 +45,9 @@ class PatientProfileScreen extends StatelessWidget {
if (routeArgs.containsKey("isInpatient")) {
isInpatient = routeArgs['isInpatient'];
}
if (routeArgs.containsKey("isDischargedPatient")) {
isDischargedPatient = routeArgs['isDischargedPatient'];
}
return BaseView<PatientViewModel>(
builder: (_, patientViewModel, w) => AppScaffold(
@ -77,6 +81,7 @@ class PatientProfileScreen extends StatelessWidget {
from: from,
to: to,
isInpatient:isInpatient,
isDischargedPatient: isDischargedPatient,
)
: isFromSearch
? ProfileMedicalInfoWidgetSearch(

@ -246,7 +246,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
style:
TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)),
new TextSpan(
text: widget.reply.remarks.trim(),
text: widget.reply?.remarks?.trim()??'',
style: TextStyle(
fontFamily: 'Poppins',
color: Color(0xFF575757),

@ -20,7 +20,7 @@ class PatientProfileButton extends StatelessWidget {
final bool isDisable;
final bool isLoading;
final Function onTap;
final bool isDischargedPatient;
PatientProfileButton(
{Key key,
this.patient,
@ -35,7 +35,7 @@ class PatientProfileButton extends StatelessWidget {
this.isLoading = false,
this.from,
this.to,
this.isInPatient = false,
this.isInPatient = false, this.isDischargedPatient=false,
})
: super(key: key);
@ -132,6 +132,7 @@ class PatientProfileButton extends StatelessWidget {
'patientType': patientType,
'arrivalType': arrivalType,
'isInpatient': isInPatient,
'isDischargedPatient;': isDischargedPatient,
});
}
}

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:url_launcher/url_launcher.dart';
class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
with PreferredSizeWidget {
@ -72,6 +73,18 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
DoctorApp.female_1,
color: Colors.pink,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell(
onTap: () {
launch("tel://" + patient.mobileNumber);
},
child: Icon(
Icons.phone,
color: Colors.black87,
),
),
),
]),
),
Row(children: [

@ -139,9 +139,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
fontWeight: FontWeight.w600,
)
: AppText(
DateUtils.convertStringToDateFormat(
patient.arrivedOn,
'MM-dd-yyyy HH:mm'),
DateUtils.getDayMonthYearDateFormatted(DateUtils.convertStringToDate(patient.arrivedOn)),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
)

@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'large_avatar.dart';
@ -91,6 +92,18 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
DoctorApp.female_1,
color: Colors.pink,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell(
onTap: () {
launch("tel://" + patient.mobileNumber);
},
child: Icon(
Icons.phone,
color: Colors.black87,
),
),
)
]),
),
Row(children: [

@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'large_avatar.dart';
@ -99,6 +100,18 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
DoctorApp.female_1,
color: Colors.pink,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell(
onTap: () {
launch("tel://" + patient.mobileNumber);
},
child: Icon(
Icons.phone,
color: Colors.black87,
),
),
)
]),
),
Row(children: [

@ -24,6 +24,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
final String patientType;
final String arrivalType;
final bool isInpatient;
final bool isDischargedPatient;
@ -33,7 +34,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
this.patientType,
this.arrivalType,
this.from,
this.to, this.isInpatient});
this.to, this.isInpatient, this.isDischargedPatient = false});
@override
Widget build(BuildContext context) {
@ -94,6 +95,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),

@ -21,6 +21,7 @@ class DoctorCard extends StatelessWidget {
final Function onTap;
final bool isPrescriptions;
final String clinic;
final bool isShowEye;
DoctorCard(
{this.doctorName,
@ -31,7 +32,8 @@ class DoctorCard extends StatelessWidget {
this.appointmentDate,
this.orderNo,
this.isPrescriptions = false,
this.clinic});
this.clinic,
this.isShowEye = true});
@override
Widget build(BuildContext context) {
@ -50,7 +52,7 @@ class DoctorCard extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(15.0),
child: InkWell(
onTap: onTap,
onTap: (isShowEye) ? onTap : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@ -169,9 +171,10 @@ class DoctorCard extends StatelessWidget {
]),
),
),
Icon(
EvaIcons.eye,
)
if (isShowEye)
Icon(
EvaIcons.eye,
)
],
),
),

Loading…
Cancel
Save