Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into development
commit
5003b3a001
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue