Merge branch 'development' into 'master'
Release 2 See merge request Cloud_Solution/doctor_app_flutter!615merge-requests/624/merge
commit
e5de65bc82
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
enum PatientType { inPatient, OutPatient }
|
||||||
|
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
class PatientSearchRequestModel {
|
||||||
|
int doctorID;
|
||||||
|
String firstName;
|
||||||
|
String middleName;
|
||||||
|
String lastName;
|
||||||
|
String patientMobileNumber;
|
||||||
|
String patientIdentificationID;
|
||||||
|
int patientID;
|
||||||
|
String from;
|
||||||
|
String to;
|
||||||
|
int searchType;
|
||||||
|
String mobileNo;
|
||||||
|
String identificationNo;
|
||||||
|
|
||||||
|
PatientSearchRequestModel(
|
||||||
|
{this.doctorID =0,
|
||||||
|
this.firstName ="0",
|
||||||
|
this.middleName ="0",
|
||||||
|
this.lastName ="0",
|
||||||
|
this.patientMobileNumber ="0",
|
||||||
|
this.patientIdentificationID ="0",
|
||||||
|
this.patientID =0,
|
||||||
|
this.searchType =1,
|
||||||
|
this.mobileNo="",
|
||||||
|
this.identificationNo="0",
|
||||||
|
this.from ="0",
|
||||||
|
this.to ="0"});
|
||||||
|
|
||||||
|
PatientSearchRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
firstName = json['FirstName'];
|
||||||
|
middleName = json['MiddleName'];
|
||||||
|
lastName = json['LastName'];
|
||||||
|
patientMobileNumber = json['PatientMobileNumber'];
|
||||||
|
patientIdentificationID = json['PatientIdentificationID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
from = json['From'];
|
||||||
|
to = json['To'];
|
||||||
|
searchType = json['SearchType'];
|
||||||
|
mobileNo = json['MobileNo'];
|
||||||
|
identificationNo = json['IdentificationNo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['FirstName'] = this.firstName;
|
||||||
|
data['MiddleName'] = this.middleName;
|
||||||
|
data['LastName'] = this.lastName;
|
||||||
|
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||||
|
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['From'] = this.from;
|
||||||
|
data['To'] = this.to;
|
||||||
|
data['SearchType'] = this.searchType;
|
||||||
|
data['MobileNo'] = this.mobileNo;
|
||||||
|
data['IdentificationNo'] = this.identificationNo;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
|
||||||
|
class OutPatientService extends BaseService {
|
||||||
|
List<PatiantInformtion> _patientList = [];
|
||||||
|
List<PatiantInformtion> get patientList => _patientList;
|
||||||
|
|
||||||
|
|
||||||
|
Future getOutPatient(PatientSearchRequestModel patientSearchRequestModel) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_MY_OUT_PATIENT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_patientList.clear();
|
||||||
|
response['List_MyOutPatient'].forEach((v) {
|
||||||
|
_patientList.add(PatiantInformtion.fromJson(v));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: patientSearchRequestModel.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Future getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
PRM_SEARCH_PATIENT,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
_patientList.clear();
|
||||||
|
response['GetPatientFileInformation_PRMList'].forEach((v) {
|
||||||
|
_patientList.add(PatiantInformtion.fromJson(v));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: patientSearchRequestModel.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
|
||||||
|
class PatientInPatientService extends BaseService {
|
||||||
|
List<PatiantInformtion> inPatientList = List();
|
||||||
|
|
||||||
|
Future getInPatientList(
|
||||||
|
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
|
||||||
|
hasError = false;
|
||||||
|
await getDoctorProfile();
|
||||||
|
|
||||||
|
if (isMyInpatient) {
|
||||||
|
requestModel.doctorID = doctorProfile.doctorID;
|
||||||
|
}else {
|
||||||
|
requestModel.doctorID = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_PATIENT_IN_PATIENT_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
inPatientList.clear();
|
||||||
|
|
||||||
|
response['List_MyInPatient'].forEach((v) {
|
||||||
|
inPatientList.add(PatiantInformtion.fromJson(v));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: requestModel.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,195 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/patientInPatientService.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
|
||||||
|
import '../../locator.dart';
|
||||||
|
import 'base_view_model.dart';
|
||||||
|
|
||||||
|
class PatientSearchViewModel extends BaseViewModel{
|
||||||
|
OutPatientService _outPatientService = locator<OutPatientService>();
|
||||||
|
|
||||||
|
List<PatiantInformtion> get patientList => _outPatientService.patientList;
|
||||||
|
|
||||||
|
List<PatiantInformtion> filterData = [];
|
||||||
|
|
||||||
|
searchData(String str) {
|
||||||
|
var strExist = str.length > 0 ? true : false;
|
||||||
|
if (strExist) {
|
||||||
|
filterData = [];
|
||||||
|
for (var i = 0; i < _outPatientService.patientList.length; i++) {
|
||||||
|
String firstName = _outPatientService.patientList[i].firstName.toUpperCase();
|
||||||
|
String lastName = _outPatientService.patientList[i].lastName.toUpperCase();
|
||||||
|
String mobile = _outPatientService.patientList[i].mobileNumber.toUpperCase();
|
||||||
|
String patientID = _outPatientService.patientList[i].patientId.toString();
|
||||||
|
|
||||||
|
if (firstName.contains(str.toUpperCase()) ||
|
||||||
|
lastName.contains(str.toUpperCase()) ||
|
||||||
|
mobile.contains(str) ||
|
||||||
|
patientID.contains(str)) {
|
||||||
|
filterData.add(_outPatientService.patientList[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
notifyListeners();
|
||||||
|
} else {
|
||||||
|
filterData = _outPatientService.patientList;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getOutPatient(PatientSearchRequestModel patientSearchRequestModel , {bool isLocalBusy = false}) async {
|
||||||
|
if(isLocalBusy) {
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
} else {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
}
|
||||||
|
|
||||||
|
await _outPatientService.getOutPatient(
|
||||||
|
patientSearchRequestModel);
|
||||||
|
if (_outPatientService.hasError) {
|
||||||
|
error = _outPatientService.error;
|
||||||
|
if(isLocalBusy) {
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else {
|
||||||
|
setState(ViewState.Error);
|
||||||
|
}
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
filterData = _outPatientService.patientList;
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async {
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
await _outPatientService.getPatientFileInformation(
|
||||||
|
patientSearchRequestModel);
|
||||||
|
if (_outPatientService.hasError) {
|
||||||
|
error = _outPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
filterData = _outPatientService.patientList;
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
getPatientBasedOnDate (
|
||||||
|
{item, PatientSearchRequestModel patientSearchRequestModel, PatientType selectedPatientType,
|
||||||
|
bool isSearchWithKeyInfo })async {
|
||||||
|
String dateTo;
|
||||||
|
String dateFrom;
|
||||||
|
if (item == 'Tomorrow') {
|
||||||
|
dateTo = DateUtils.convertDateToFormat(
|
||||||
|
DateTime(DateTime.now().year, DateTime.now().month,
|
||||||
|
DateTime.now().day + 1),
|
||||||
|
'yyyy-MM-dd');
|
||||||
|
dateFrom = DateUtils.convertDateToFormat(
|
||||||
|
DateTime(DateTime.now().year, DateTime.now().month,
|
||||||
|
DateTime.now().day + 1),
|
||||||
|
'yyyy-MM-dd');
|
||||||
|
} else if (item == 'Next Week') {
|
||||||
|
|
||||||
|
|
||||||
|
dateTo = DateUtils.convertDateToFormat(
|
||||||
|
DateTime(DateTime.now().year, DateTime.now().month,
|
||||||
|
DateTime.now().day + 6),
|
||||||
|
'yyyy-MM-dd');
|
||||||
|
|
||||||
|
dateFrom = DateUtils.convertDateToFormat(
|
||||||
|
DateTime(DateTime.now().year, DateTime.now().month,
|
||||||
|
DateTime.now().day + 1),
|
||||||
|
'yyyy-MM-dd');
|
||||||
|
} else {
|
||||||
|
dateFrom = DateUtils.convertDateToFormat(
|
||||||
|
DateTime(
|
||||||
|
DateTime.now().year, DateTime.now().month, DateTime.now().day),
|
||||||
|
'yyyy-MM-dd');
|
||||||
|
dateTo= DateUtils.convertDateToFormat(
|
||||||
|
DateTime(
|
||||||
|
DateTime.now().year, DateTime.now().month, DateTime.now().day),
|
||||||
|
'yyyy-MM-dd');
|
||||||
|
}
|
||||||
|
PatientSearchRequestModel currentModel = PatientSearchRequestModel();
|
||||||
|
currentModel.patientID = patientSearchRequestModel.patientID;
|
||||||
|
currentModel.firstName = patientSearchRequestModel.firstName;
|
||||||
|
currentModel.lastName = patientSearchRequestModel.lastName;
|
||||||
|
currentModel.middleName = patientSearchRequestModel.middleName;
|
||||||
|
currentModel.doctorID = patientSearchRequestModel.doctorID;
|
||||||
|
currentModel.from = dateFrom;
|
||||||
|
currentModel.to = dateTo;
|
||||||
|
|
||||||
|
|
||||||
|
if(isSearchWithKeyInfo) {
|
||||||
|
await getPatientFileInformation(currentModel);
|
||||||
|
} else {
|
||||||
|
await getOutPatient(currentModel, isLocalBusy: true);
|
||||||
|
}
|
||||||
|
filterData = _outPatientService.patientList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PatientInPatientService _inPatientService =
|
||||||
|
locator<PatientInPatientService>();
|
||||||
|
|
||||||
|
List<PatiantInformtion> get _inPatientList => _inPatientService.inPatientList;
|
||||||
|
List<PatiantInformtion> filteredInPatientItems = List();
|
||||||
|
|
||||||
|
Future getInPatientList(PatientSearchRequestModel requestModel,
|
||||||
|
{bool isMyInpatient = false, bool isFirstTime = true}) async {
|
||||||
|
await getDoctorProfile();
|
||||||
|
if (isFirstTime)
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
else
|
||||||
|
setState(ViewState.BusyLocal);
|
||||||
|
await _inPatientService.getInPatientList(requestModel, false);
|
||||||
|
if (_inPatientService.hasError) {
|
||||||
|
error = _inPatientService.error;
|
||||||
|
setState(ViewState.Error);
|
||||||
|
} else {
|
||||||
|
filteredInPatientItems.clear();
|
||||||
|
if (_inPatientList.length > 0)
|
||||||
|
filteredInPatientItems.addAll(_inPatientList);
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void filterSearchResults(String query) {
|
||||||
|
var strExist = query.length > 0 ? true : false;
|
||||||
|
if (strExist) {
|
||||||
|
filteredInPatientItems = [];
|
||||||
|
for (var i = 0; i < _inPatientList.length; i++) {
|
||||||
|
String firstName = _inPatientList[i].firstName.toUpperCase();
|
||||||
|
String lastName = _inPatientList[i].lastName.toUpperCase();
|
||||||
|
String mobile = _inPatientList[i].mobileNumber.toUpperCase();
|
||||||
|
String patientID = _inPatientList[i].patientId.toString();
|
||||||
|
|
||||||
|
if (firstName.contains(query.toUpperCase()) ||
|
||||||
|
lastName.contains(query.toUpperCase()) ||
|
||||||
|
mobile.contains(query) ||
|
||||||
|
patientID.contains(query)) {
|
||||||
|
filteredInPatientItems.add(_inPatientList[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
notifyListeners();
|
||||||
|
} else {
|
||||||
|
if (_inPatientList.length > 0)
|
||||||
|
filteredInPatientItems.clear();
|
||||||
|
filteredInPatientItems.addAll(_inPatientList);
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,239 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.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/patients/PatientCard.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/errors/error_message.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../routes.dart';
|
||||||
|
|
||||||
|
class PatientInPatientScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_PatientInPatientScreenState createState() => _PatientInPatientScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PatientInPatientScreenState extends State<PatientInPatientScreen> {
|
||||||
|
PatientSearchRequestModel requestModel = PatientSearchRequestModel();
|
||||||
|
int _activeTab = 0;
|
||||||
|
|
||||||
|
TextEditingController _searchController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_searchController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return BaseView<PatientSearchViewModel>(
|
||||||
|
onModelReady: (model) => model.getInPatientList(requestModel),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
||||||
|
margin: EdgeInsets.only(top: 50),
|
||||||
|
child: Row(children: [
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(Icons.arrow_back_ios),
|
||||||
|
color: Colors.black, //Colors.black,
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).inPatient,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.8,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Color(0xFF2B353E),
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
tabsBar(context, screenSize, model),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(16.0),
|
||||||
|
child: AppTextFieldCustom(
|
||||||
|
hintText: TranslationBase.of(context)
|
||||||
|
.searchPatientName,
|
||||||
|
isTextFieldHasSuffix: true,
|
||||||
|
suffixIcon: IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.search,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
controller: _searchController,
|
||||||
|
onChanged: (value) {
|
||||||
|
model.filterSearchResults(value);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
model.filteredInPatientItems.length > 0
|
||||||
|
? Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// const SizedBox(
|
||||||
|
// height: 16,
|
||||||
|
// ),
|
||||||
|
...List.generate(model.filteredInPatientItems.length, (index) {
|
||||||
|
if(_activeTab == 0)
|
||||||
|
return PatientCard(
|
||||||
|
patientInfo: model.filteredInPatientItems[index],
|
||||||
|
patientType: "1",
|
||||||
|
arrivalType: "1",
|
||||||
|
isInpatient: true,
|
||||||
|
isMyPatient: model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID,
|
||||||
|
onTap: () {
|
||||||
|
FocusScopeNode currentFocus = FocusScope.of(context);
|
||||||
|
if (!currentFocus.hasPrimaryFocus) {
|
||||||
|
currentFocus.unfocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
Navigator.of(context)
|
||||||
|
.pushNamed(PATIENTS_PROFILE, arguments: {
|
||||||
|
"patient": model.filteredInPatientItems[index],
|
||||||
|
"patientType": "1",
|
||||||
|
"from": "0",
|
||||||
|
"to": "0",
|
||||||
|
"isSearch": false,
|
||||||
|
"isInpatient": true,
|
||||||
|
"arrivalType": "1",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
else if(model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID && _activeTab==1)
|
||||||
|
return PatientCard(
|
||||||
|
patientInfo: model.filteredInPatientItems[index],
|
||||||
|
patientType: "1",
|
||||||
|
arrivalType: "1",
|
||||||
|
isInpatient: true,
|
||||||
|
isMyPatient: model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID,
|
||||||
|
onTap: () {
|
||||||
|
FocusScopeNode currentFocus = FocusScope.of(context);
|
||||||
|
if (!currentFocus.hasPrimaryFocus) {
|
||||||
|
currentFocus.unfocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
Navigator.of(context)
|
||||||
|
.pushNamed(PATIENTS_PROFILE, arguments: {
|
||||||
|
"patient": model.filteredInPatientItems[index],
|
||||||
|
"patientType": "1",
|
||||||
|
"from": "0",
|
||||||
|
"to": "0",
|
||||||
|
"isSearch": false,
|
||||||
|
"isInpatient": true,
|
||||||
|
"arrivalType": "1",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
else return SizedBox();
|
||||||
|
}),
|
||||||
|
SizedBox(height: 15,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: ErrorMessage(
|
||||||
|
error: TranslationBase.of(context).noDataAvailable)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget tabsBar(
|
||||||
|
BuildContext context, Size screenSize, PatientSearchViewModel model) {
|
||||||
|
List<String> _tabs = [
|
||||||
|
TranslationBase.of(context).inPatientAll.toUpperCase(),
|
||||||
|
TranslationBase.of(context).inPatient.toUpperCase(),
|
||||||
|
];
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration: TextFieldsUtils.containerBorderDecoration(
|
||||||
|
Color(0Xffffffff), Color(0xFFCCCCCC),
|
||||||
|
borderRadius: 4, borderWidth: 0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: _tabs.map((item) {
|
||||||
|
bool _isActive = _tabs[_activeTab] == item ? true : false;
|
||||||
|
|
||||||
|
return Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
setState(() {
|
||||||
|
_activeTab = _tabs.indexOf(item);
|
||||||
|
});
|
||||||
|
FocusScopeNode currentFocus = FocusScope.of(context);
|
||||||
|
if (!currentFocus.hasPrimaryFocus) {
|
||||||
|
currentFocus.unfocus();
|
||||||
|
}
|
||||||
|
if (_activeTab==0) {
|
||||||
|
GifLoaderDialogUtils.showMyDialog(
|
||||||
|
context);
|
||||||
|
await model.getInPatientList(requestModel,
|
||||||
|
isMyInpatient: _activeTab == 1, isFirstTime: false);
|
||||||
|
GifLoaderDialogUtils.hideDialog(
|
||||||
|
context);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration: TextFieldsUtils.containerBorderDecoration(
|
||||||
|
_isActive
|
||||||
|
? Color(0xFFD02127 /*B8382B*/)
|
||||||
|
: Color(0xFFEAEAEA),
|
||||||
|
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
|
||||||
|
borderRadius: 4,
|
||||||
|
borderWidth: 0),
|
||||||
|
child: Center(
|
||||||
|
child: AppText(
|
||||||
|
item,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: _isActive ? Colors.white : Color(0xFF2B353E),
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class HeaderInSearch extends StatelessWidget with PreferredSizeWidget {
|
||||||
|
final String title;
|
||||||
|
|
||||||
|
const HeaderInSearch({Key key, this.title}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
||||||
|
margin: EdgeInsets.only(top: 35),
|
||||||
|
child: Row(children: [
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(Icons.arrow_back_ios),
|
||||||
|
color: Colors.black, //Colors.black,
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
title,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.8,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Color(0xFF2B353E),
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
|
||||||
|
Size get preferredSize => Size(double.maxFinite,65);
|
||||||
|
}
|
||||||
@ -0,0 +1,310 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/patient_search/patients_screen_new.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.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/buttons/app_buttons_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class PatientSearchScreenNew extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_PatientSearchScreenNewState createState() => _PatientSearchScreenNewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
|
||||||
|
bool showOther = false;
|
||||||
|
bool isFormSubmitted = false;
|
||||||
|
TextEditingController patientFileInfoController = TextEditingController();
|
||||||
|
TextEditingController firstNameInfoController = TextEditingController();
|
||||||
|
TextEditingController middleNameInfoController = TextEditingController();
|
||||||
|
TextEditingController lastNameFileInfoController = TextEditingController();
|
||||||
|
PatientType selectedPatientType = PatientType.inPatient;
|
||||||
|
AuthViewModel authProvider;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
authProvider =Provider.of(context);
|
||||||
|
return BaseView<PatientSearchViewModel>(
|
||||||
|
onModelReady: (model) async {},
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
isShowAppBar: false,
|
||||||
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
BottomSheetTitle(
|
||||||
|
title: TranslationBase.of(context).searchPatient),
|
||||||
|
FractionallySizedBox(
|
||||||
|
widthFactor: 0.9,
|
||||||
|
child: Container(
|
||||||
|
color: Theme.of(context).scaffoldBackgroundColor,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
// AppText(
|
||||||
|
// 'Patient Type',
|
||||||
|
// fontWeight: FontWeight.w600,
|
||||||
|
// ),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// Radio(
|
||||||
|
// activeColor: Color(0xFFB9382C),
|
||||||
|
// value: PatientType.inPatient,
|
||||||
|
// groupValue: selectedPatientType,
|
||||||
|
// onChanged: (value) {
|
||||||
|
// setState(() {
|
||||||
|
// selectedPatientType =
|
||||||
|
// PatientType.inPatient;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// Text('InPatient'),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// Radio(
|
||||||
|
// activeColor: Color(0xFFB9382C),
|
||||||
|
// value: PatientType.OutPatient,
|
||||||
|
// groupValue: selectedPatientType,
|
||||||
|
// onChanged: (value) {
|
||||||
|
// setState(() {
|
||||||
|
// selectedPatientType =
|
||||||
|
// PatientType.OutPatient;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// Text('OutPatient'),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 0, right: 0, top: 15),
|
||||||
|
child: AppTextFieldCustom(
|
||||||
|
hintText: TranslationBase.of(context)
|
||||||
|
.patpatientIDMobilenationalientID,
|
||||||
|
isTextFieldHasSuffix: false,
|
||||||
|
maxLines: 1,
|
||||||
|
minLines: 1,
|
||||||
|
hasBorder: true,
|
||||||
|
controller: patientFileInfoController,
|
||||||
|
validationError: (isFormSubmitted && (
|
||||||
|
patientFileInfoController
|
||||||
|
.text.isEmpty &&
|
||||||
|
firstNameInfoController
|
||||||
|
.text.isEmpty &&
|
||||||
|
middleNameInfoController
|
||||||
|
.text.isEmpty &&
|
||||||
|
lastNameFileInfoController
|
||||||
|
.text.isEmpty))
|
||||||
|
? TranslationBase.of(context).emptyMessage
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
// Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
// children: [
|
||||||
|
// InkWell(
|
||||||
|
// child: this.showOther == false
|
||||||
|
// ? AppText(
|
||||||
|
// TranslationBase.of(context)
|
||||||
|
// .searchWithOther,
|
||||||
|
// color: Colors.red,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// )
|
||||||
|
// : AppText(
|
||||||
|
// TranslationBase.of(context)
|
||||||
|
// .hideOtherCriteria,
|
||||||
|
// color: Colors.red,
|
||||||
|
// fontWeight: FontWeight.bold),
|
||||||
|
// onTap: () {
|
||||||
|
// setState(() {
|
||||||
|
// this.showOther = !this.showOther;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// height: 30,
|
||||||
|
// ),
|
||||||
|
// if (showOther)
|
||||||
|
// Column(
|
||||||
|
// children: [
|
||||||
|
// AppTextFieldCustom(
|
||||||
|
// hintText:
|
||||||
|
// TranslationBase.of(context).firstName,
|
||||||
|
// controller: firstNameInfoController,
|
||||||
|
// maxLines: 1,
|
||||||
|
// minLines: 1,
|
||||||
|
// hasBorder: true,
|
||||||
|
// onChanged: (_) {},
|
||||||
|
// // validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null ,
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// height: 10,
|
||||||
|
// ),
|
||||||
|
// AppTextFieldCustom(
|
||||||
|
// hintText:
|
||||||
|
// TranslationBase.of(context).middleName,
|
||||||
|
// controller: middleNameInfoController,
|
||||||
|
// maxLines: 1,
|
||||||
|
// minLines: 1,
|
||||||
|
// onChanged: (_) {},
|
||||||
|
// hasBorder: true,
|
||||||
|
// // validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null ,
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// height: 10,
|
||||||
|
// ),
|
||||||
|
// AppTextFieldCustom(
|
||||||
|
// hintText:
|
||||||
|
// TranslationBase.of(context).lastName,
|
||||||
|
// controller: lastNameFileInfoController,
|
||||||
|
// maxLines: 1,
|
||||||
|
// minLines: 1,
|
||||||
|
// onChanged: (_) {},
|
||||||
|
// hasBorder: true,
|
||||||
|
// // validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null ,
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// height: 10,
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.12,
|
||||||
|
),
|
||||||
|
])),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bottomSheet: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(0.0),
|
||||||
|
),
|
||||||
|
border: Border.all(color: HexColor('#707070'), width: 0),
|
||||||
|
),
|
||||||
|
height: MediaQuery.of(context).size.height * 0.1,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: .80,
|
||||||
|
child: Center(
|
||||||
|
child: AppButton(
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
title: TranslationBase.of(context).search,
|
||||||
|
onPressed: () {
|
||||||
|
onSubmitSearch();
|
||||||
|
},
|
||||||
|
color: Colors.red[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
onSubmitSearch() {
|
||||||
|
GifLoaderDialogUtils.showMyDialog(context);
|
||||||
|
setState(() {
|
||||||
|
isFormSubmitted = true;
|
||||||
|
});
|
||||||
|
PatientSearchRequestModel patientSearchRequestModel =
|
||||||
|
PatientSearchRequestModel(doctorID: authProvider.doctorProfile.doctorID);
|
||||||
|
if (showOther) {
|
||||||
|
patientSearchRequestModel.firstName = firstNameInfoController.text.trim().isEmpty?"0":firstNameInfoController.text.trim();
|
||||||
|
patientSearchRequestModel.middleName = middleNameInfoController.text.trim().isEmpty?"0":middleNameInfoController.text.trim();
|
||||||
|
patientSearchRequestModel.lastName = lastNameFileInfoController.text.isEmpty?"0":lastNameFileInfoController.text.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (patientFileInfoController.text.isNotEmpty) {
|
||||||
|
if (patientFileInfoController.text.length == 10 &&
|
||||||
|
(patientFileInfoController.text[0] == '2' ||
|
||||||
|
patientFileInfoController.text[0] == '1')) {
|
||||||
|
patientSearchRequestModel.identificationNo =
|
||||||
|
patientFileInfoController.text;
|
||||||
|
patientSearchRequestModel.searchType = 2;
|
||||||
|
patientSearchRequestModel.patientID = 0;
|
||||||
|
} else if ((patientFileInfoController.text.length == 10 ||
|
||||||
|
patientFileInfoController.text.length == 9) &&
|
||||||
|
((patientFileInfoController.text[0] == '0' &&
|
||||||
|
patientFileInfoController.text[1] == '5') ||
|
||||||
|
patientFileInfoController.text[0] == '5')) {
|
||||||
|
patientSearchRequestModel.mobileNo = patientFileInfoController.text;
|
||||||
|
patientSearchRequestModel.searchType = 0;
|
||||||
|
} else {
|
||||||
|
patientSearchRequestModel.patientID =
|
||||||
|
int.parse(patientFileInfoController.text);
|
||||||
|
patientSearchRequestModel.searchType = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GifLoaderDialogUtils.hideDialog(context);
|
||||||
|
|
||||||
|
if (patientFileInfoController.text.isNotEmpty ||
|
||||||
|
firstNameInfoController.text.isNotEmpty ||
|
||||||
|
middleNameInfoController.text.isNotEmpty ||
|
||||||
|
lastNameFileInfoController.text.isNotEmpty) {
|
||||||
|
setState(() {
|
||||||
|
isFormSubmitted = false;
|
||||||
|
});
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (BuildContext context) => PatientsScreenNew(
|
||||||
|
selectedPatientType: selectedPatientType,
|
||||||
|
patientSearchRequestModel: patientSearchRequestModel,
|
||||||
|
isSearchWithKeyInfo:
|
||||||
|
patientFileInfoController.text.isNotEmpty ? true : false,
|
||||||
|
isSearch: true,
|
||||||
|
isSearchAndOut:true,
|
||||||
|
searchKey: patientFileInfoController.text,
|
||||||
|
isInpatient: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,259 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/routes.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/patient_search/header.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/PatientCard.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/errors/error_message.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
// ignore: must_be_immutable
|
||||||
|
class PatientsScreenNew extends StatefulWidget {
|
||||||
|
final patientSearchForm;
|
||||||
|
final selectedType;
|
||||||
|
final isAppbar;
|
||||||
|
final arrivalType;
|
||||||
|
final isView;
|
||||||
|
final PatientType selectedPatientType;
|
||||||
|
final PatientSearchRequestModel patientSearchRequestModel;
|
||||||
|
final bool isSearchWithKeyInfo;
|
||||||
|
final bool isSearch;
|
||||||
|
final bool isInpatient;
|
||||||
|
final bool isSearchAndOut;
|
||||||
|
final String searchKey;
|
||||||
|
|
||||||
|
|
||||||
|
PatientsScreenNew(
|
||||||
|
{this.patientSearchForm,
|
||||||
|
this.selectedType,
|
||||||
|
this.isAppbar = true,
|
||||||
|
this.arrivalType,
|
||||||
|
this.isView,
|
||||||
|
this.selectedPatientType,
|
||||||
|
this.patientSearchRequestModel,
|
||||||
|
this.isSearchWithKeyInfo = true,
|
||||||
|
this.isSearch = false,
|
||||||
|
this.isInpatient = false, this.searchKey, this.isSearchAndOut=false});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PatientsScreenNewState createState() => _PatientsScreenNewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PatientsScreenNewState extends State<PatientsScreenNew> {
|
||||||
|
int clinicId;
|
||||||
|
AuthViewModel authProvider;
|
||||||
|
|
||||||
|
List<String> _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week'];
|
||||||
|
|
||||||
|
int _activeLocation = 0;
|
||||||
|
String patientType;
|
||||||
|
String patientTypeTitle;
|
||||||
|
var selectedFilter = 1;
|
||||||
|
String arrivalType;
|
||||||
|
ProjectViewModel projectsProvider;
|
||||||
|
var isView;
|
||||||
|
final _controller = TextEditingController();
|
||||||
|
|
||||||
|
PatientModel patient;
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
authProvider = Provider.of(context);
|
||||||
|
_locations = [
|
||||||
|
TranslationBase.of(context).today,
|
||||||
|
TranslationBase.of(context).tomorrow,
|
||||||
|
TranslationBase.of(context).nextWeek,
|
||||||
|
];
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
|
||||||
|
return BaseView<PatientSearchViewModel>(
|
||||||
|
onModelReady: (model) async {
|
||||||
|
if(!widget.isSearchWithKeyInfo && widget.selectedPatientType == PatientType.OutPatient) {
|
||||||
|
await model.getOutPatient(widget.patientSearchRequestModel);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
await model.getPatientFileInformation(widget.patientSearchRequestModel);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
appBarTitle: "Search Patient",
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBar: !widget.isSearch && !widget.isInpatient?HeaderInSearch(
|
||||||
|
title: "My Out patient",
|
||||||
|
):HeaderInSearch(
|
||||||
|
title: "Search for ${widget.searchKey}",
|
||||||
|
),
|
||||||
|
baseViewModel: model,
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
if(!widget.isInpatient && !widget.isSearch)
|
||||||
|
Container(
|
||||||
|
// color: Colors.red,
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration: TextFieldsUtils
|
||||||
|
.containerBorderDecoration(
|
||||||
|
Color(0Xffffffff),
|
||||||
|
Color(0xFFCCCCCC),
|
||||||
|
borderRadius: 4,
|
||||||
|
borderWidth: 0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: _locations.map((item) {
|
||||||
|
bool _isActive = _locations[_activeLocation] == item
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
|
||||||
|
return Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
setState(() {
|
||||||
|
_activeLocation = _locations.indexOf(item);
|
||||||
|
});
|
||||||
|
GifLoaderDialogUtils.showMyDialog(context);
|
||||||
|
await model.getPatientBasedOnDate(item: item,
|
||||||
|
selectedPatientType: widget.selectedPatientType,
|
||||||
|
patientSearchRequestModel: widget
|
||||||
|
.patientSearchRequestModel,
|
||||||
|
isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
|
||||||
|
GifLoaderDialogUtils.hideDialog(context);
|
||||||
|
},
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration: TextFieldsUtils.containerBorderDecoration(
|
||||||
|
_isActive
|
||||||
|
? Color(0xFFD02127 /*B8382B*/)
|
||||||
|
: Color(0xFFEAEAEA),
|
||||||
|
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
|
||||||
|
borderRadius: 4,
|
||||||
|
borderWidth: 0),
|
||||||
|
child: Center(
|
||||||
|
child: AppText(
|
||||||
|
item,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: _isActive ? Colors.white : Color(0xFF2B353E),
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 18.5),
|
||||||
|
Container(
|
||||||
|
width: SizeConfig.screenWidth * 0.9,
|
||||||
|
height: 75,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(6.0)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0,
|
||||||
|
color: HexColor("#CCCCCC"),
|
||||||
|
),
|
||||||
|
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) {
|
||||||
|
model.searchData(str);
|
||||||
|
}),
|
||||||
|
])),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.0,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: model.filterData.isEmpty
|
||||||
|
? Center(
|
||||||
|
child: ErrorMessage(
|
||||||
|
error: TranslationBase.of(context)
|
||||||
|
.youDontHaveAnyPatient,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: ListView.builder(
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemCount: model.filterData.length,
|
||||||
|
itemBuilder: (BuildContext ctxt, int index) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
child: PatientCard(
|
||||||
|
patientInfo: model.filterData[index],
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
isFromSearch:widget.isSearchAndOut,
|
||||||
|
isInpatient: widget.isInpatient,
|
||||||
|
onTap: () {
|
||||||
|
// TODO change the parameter to daynamic
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
PATIENTS_PROFILE,
|
||||||
|
arguments: {
|
||||||
|
"patient": model.filterData[index],
|
||||||
|
"patientType": "1",
|
||||||
|
"from": widget
|
||||||
|
.patientSearchRequestModel.from,
|
||||||
|
"to": widget
|
||||||
|
.patientSearchRequestModel.from,
|
||||||
|
"isSearch": widget.isSearch,
|
||||||
|
"isInpatient": widget.isInpatient,
|
||||||
|
"arrivalType": "7",
|
||||||
|
"isSearchAndOut": widget.isSearchAndOut,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// isFromSearch: widget.isSearch,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
})),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class TimeBar extends StatefulWidget {
|
||||||
|
final PatientSearchViewModel model;
|
||||||
|
final PatientType selectedPatientType;
|
||||||
|
final PatientSearchRequestModel patientSearchRequestModel;
|
||||||
|
final bool isSearchWithKeyInfo;
|
||||||
|
|
||||||
|
|
||||||
|
const TimeBar({Key key, this.model, this.selectedPatientType, this.patientSearchRequestModel, this.isSearchWithKeyInfo}) : super(key: key);
|
||||||
|
@override
|
||||||
|
_TimeBarState createState() => _TimeBarState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TimeBarState extends State<TimeBar> {
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
List _locations = [
|
||||||
|
TranslationBase.of(context).today,
|
||||||
|
TranslationBase.of(context).tomorrow,
|
||||||
|
TranslationBase.of(context).nextWeek,
|
||||||
|
];
|
||||||
|
int _activeLocation = 0;
|
||||||
|
return Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.0619,
|
||||||
|
width: SizeConfig.screenWidth * 0.94,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0Xffffffff),
|
||||||
|
borderRadius: BorderRadius.circular(12.5),
|
||||||
|
// border: Border.all(
|
||||||
|
// width: 0.5,
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: _locations.map((item) {
|
||||||
|
bool _isActive = _locations[_activeLocation] == item ? true : false;
|
||||||
|
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
||||||
|
InkWell(
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.058,
|
||||||
|
width: SizeConfig.screenWidth * 0.2334,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomRight: Radius.circular(12.5),
|
||||||
|
topRight: Radius.circular(12.5),
|
||||||
|
topLeft: Radius.circular(9.5),
|
||||||
|
bottomLeft: Radius.circular(9.5)),
|
||||||
|
color: _isActive ? HexColor("#B8382B") : Colors.white,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
item,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color: _isActive
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black, //Colors.black,
|
||||||
|
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () async{
|
||||||
|
setState(() {
|
||||||
|
_activeLocation = _locations.indexOf(item);
|
||||||
|
});
|
||||||
|
GifLoaderDialogUtils.showMyDialog(context);
|
||||||
|
await widget.model.getPatientBasedOnDate(item:item,selectedPatientType:widget.selectedPatientType, patientSearchRequestModel:widget.patientSearchRequestModel, isSearchWithKeyInfo:widget.isSearchWithKeyInfo);
|
||||||
|
GifLoaderDialogUtils.hideDialog(context);
|
||||||
|
}),
|
||||||
|
_isActive
|
||||||
|
? Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomRight: Radius.circular(10),
|
||||||
|
topRight: Radius.circular(10)),
|
||||||
|
color: Colors.white),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: 1,
|
||||||
|
width: SizeConfig.screenWidth * 0.23,
|
||||||
|
)
|
||||||
|
: Container()
|
||||||
|
]);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,227 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.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_in_patient.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import '../../../routes.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class InPatientProfileScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_InPatientProfileScreenState createState() => _InPatientProfileScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _InPatientProfileScreenState extends State<InPatientProfileScreen>with SingleTickerProviderStateMixin {
|
||||||
|
PatiantInformtion patient;
|
||||||
|
|
||||||
|
bool isFromSearch = false;
|
||||||
|
|
||||||
|
bool isInpatient = false;
|
||||||
|
|
||||||
|
bool isDischargedPatient = false;
|
||||||
|
String patientType;
|
||||||
|
String arrivalType;
|
||||||
|
String from;
|
||||||
|
String to;
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
patient = routeArgs['patient'];
|
||||||
|
patientType = routeArgs['patientType'];
|
||||||
|
arrivalType = routeArgs['arrivalType'];
|
||||||
|
from = routeArgs['from'];
|
||||||
|
to = routeArgs['to'];
|
||||||
|
if (routeArgs.containsKey("isSearch")) {
|
||||||
|
isFromSearch = routeArgs['isSearch'];
|
||||||
|
}
|
||||||
|
if (routeArgs.containsKey("isInpatient")) {
|
||||||
|
isInpatient = routeArgs['isInpatient'];
|
||||||
|
}
|
||||||
|
if (routeArgs.containsKey("isDischargedPatient")) {
|
||||||
|
isDischargedPatient = routeArgs['isDischargedPatient'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<PatientViewModel>(
|
||||||
|
builder: (_, patientViewModel, w) => AppScaffold(
|
||||||
|
baseViewModel: patientViewModel,
|
||||||
|
appBarTitle: TranslationBase.of(context).patientProfile,
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 10),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15),
|
||||||
|
child: GridView.count(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
crossAxisSpacing: 10,
|
||||||
|
mainAxisSpacing: 10,
|
||||||
|
childAspectRatio: 1 / 1.0,
|
||||||
|
crossAxisCount: 3,
|
||||||
|
children: [
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
from: from,
|
||||||
|
to: to,
|
||||||
|
nameLine1: TranslationBase.of(context).vital,
|
||||||
|
nameLine2: TranslationBase.of(context).signs,
|
||||||
|
route: VITAL_SIGN_DETAILS,
|
||||||
|
isInPatient: true,
|
||||||
|
icon: 'patient/vital_signs.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: LAB_RESULT,
|
||||||
|
isInPatient: true,
|
||||||
|
nameLine1: TranslationBase.of(context).lab,
|
||||||
|
nameLine2: TranslationBase.of(context).result,
|
||||||
|
icon: 'patient/lab_results.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
isInPatient: isInpatient,
|
||||||
|
route: RADIOLOGY_PATIENT,
|
||||||
|
nameLine1: TranslationBase.of(context).radiology,
|
||||||
|
nameLine2: TranslationBase.of(context).result,
|
||||||
|
icon: 'patient/health_summary.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: ORDER_PRESCRIPTION_NEW,
|
||||||
|
nameLine1: TranslationBase.of(context).patient,
|
||||||
|
nameLine2: TranslationBase.of(context).prescription,
|
||||||
|
icon: 'patient/order_prescription.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: PROGRESS_NOTE,
|
||||||
|
isDischargedPatient: isDischargedPatient,
|
||||||
|
nameLine1: TranslationBase.of(context).progress,
|
||||||
|
nameLine2: TranslationBase.of(context).note,
|
||||||
|
icon: 'patient/Progress_notes.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: ORDER_NOTE,
|
||||||
|
isDischargedPatient: isDischargedPatient,
|
||||||
|
nameLine1: "Order", //"Text",
|
||||||
|
nameLine2:
|
||||||
|
"Sheet", //TranslationBase.of(context).orders,
|
||||||
|
icon: 'patient/Progress_notes.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: ORDER_PROCEDURE,
|
||||||
|
nameLine1: TranslationBase.of(context).orders,
|
||||||
|
nameLine2: TranslationBase.of(context).procedures,
|
||||||
|
icon: 'patient/Order_Procedures.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: MEDICAL_FILE,
|
||||||
|
nameLine1: "Health",
|
||||||
|
//TranslationBase.of(context).medicalReport,
|
||||||
|
nameLine2: "Summary",
|
||||||
|
//TranslationBase.of(context).summaryReport,
|
||||||
|
icon: 'patient/health_summary.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
isDisable: true,
|
||||||
|
route: MEDICAL_FILE,
|
||||||
|
nameLine1: "Medical", //Health
|
||||||
|
//TranslationBase.of(context).medicalReport,
|
||||||
|
nameLine2: "Report", //Report
|
||||||
|
//TranslationBase.of(context).summaryReport,
|
||||||
|
icon: 'patient/health_summary.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: REFER_IN_PATIENT_TO_DOCTOR,
|
||||||
|
isInPatient: true,
|
||||||
|
nameLine1: TranslationBase.of(context).referral,
|
||||||
|
nameLine2: TranslationBase.of(context).patient,
|
||||||
|
icon: 'patient/refer_patient.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: PATIENT_INSURANCE_APPROVALS_NEW,
|
||||||
|
nameLine1: TranslationBase.of(context).insurance,
|
||||||
|
nameLine2: TranslationBase.of(context).approvals,
|
||||||
|
icon: 'patient/vital_signs.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
isDisable: true,
|
||||||
|
route: null,
|
||||||
|
nameLine1: "Discharge",
|
||||||
|
nameLine2: "Summery",
|
||||||
|
icon: 'patient/patient_sick_leave.png'),
|
||||||
|
PatientProfileButton(
|
||||||
|
|
||||||
|
patient: patient,
|
||||||
|
patientType: patientType,
|
||||||
|
arrivalType: arrivalType,
|
||||||
|
route: ADD_SICKLEAVE,
|
||||||
|
nameLine1: TranslationBase.of(context).patientSick,
|
||||||
|
nameLine2: TranslationBase.of(context).leave,
|
||||||
|
icon: 'patient/patient_sick_leave.png'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AvatarWidget extends StatelessWidget {
|
||||||
|
final Widget avatarIcon;
|
||||||
|
|
||||||
|
AvatarWidget(this.avatarIcon);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return 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),
|
||||||
|
),
|
||||||
|
child: avatarIcon,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue