Merge branch 'sultan' into 'development'

Sultan

See merge request Cloud_Solution/doctor_app_flutter!487
merge-requests/488/merge
Mohammad Aljammal 5 years ago
commit 9fbb5f026b

@ -68,7 +68,7 @@ class BaseAppClient {
body['LanguageID'] = 2; body['LanguageID'] = 2;
body['stamp'] = STAMP; body['stamp'] = STAMP;
// if(!body.containsKey("IPAdress")) // if(!body.containsKey("IPAdress"))
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
@ -86,9 +86,6 @@ class BaseAppClient {
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
String bodyData= json.encode(body);
var asd = "";
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(url, final response = await http.post(url,

@ -837,21 +837,18 @@ const Map<String, Map<String, String>> localizedValues = {
"enter_credentials": { "enter_credentials": {
"en": "Enter the user credentials below", "en": "Enter the user credentials below",
"ar": "أدخل بيانات اعتماد المستخدم أدناه" "ar": "أدخل بيانات اعتماد المستخدم أدناه"
},
"step": {
"en": "Step",
"ar": "خطوة"
},
"fieldRequired": {
"en": "This field is required",
"ar": "هذه الخانة مطلوبه"
}, },
"step": {"en": "Step", "ar": "خطوة"},
"fieldRequired": {"en": "This field is required", "ar": "هذه الخانة مطلوبه"},
"applyOrRescheduleLeave": { "applyOrRescheduleLeave": {
"en": "Apply Or Reschedule Leave",
"ar": "التقدم بطلب أو إعادة جدولة الإجازة"
},
"myQRCode": {"en": "My QR Code", "ar": "My QR Code"},
"patientIDMobilenational": {
"en": "Patient ID, National ID, Mobile Number",
"ar": "هوية المريض ، الهوية الوطنية ، رقم الهاتف المحمول"
"en": "Apply Reschedule Leave", "en": "Apply Reschedule Leave",
"ar": "التقدم بطلب إعادة جدولة الإجازة" "ar": "التقدم بطلب إعادة جدولة الإجازة"
},"myQRCode": {
"en": "My QR Code",
"ar": "My QR Code"
}, },
}; };

@ -130,7 +130,8 @@ class PatientService extends BaseService {
"IsLoginForDoctorApp": patient.IsLoginForDoctorApp, "IsLoginForDoctorApp": patient.IsLoginForDoctorApp,
"PatientOutSA": patient.PatientOutSA, "PatientOutSA": patient.PatientOutSA,
"SearchType": patient.Searchtype, "SearchType": patient.Searchtype,
"MobileNo": '' "MobileNo": patient.MobileNo,
"IdentificationNo": patient.IdentificationNo
}, },
); );

@ -10,6 +10,7 @@ class GetRescheduleLeavesResponse {
int requisitionType; int requisitionType;
int status; int status;
String createdOn; String createdOn;
String statusDescription;
GetRescheduleLeavesResponse( GetRescheduleLeavesResponse(
{this.clinicId, {this.clinicId,
this.coveringDoctorId, this.coveringDoctorId,
@ -21,7 +22,8 @@ class GetRescheduleLeavesResponse {
this.requisitionNo, this.requisitionNo,
this.requisitionType, this.requisitionType,
this.status, this.status,
this.createdOn}); this.createdOn,
this.statusDescription});
GetRescheduleLeavesResponse.fromJson(Map<String, dynamic> json) { GetRescheduleLeavesResponse.fromJson(Map<String, dynamic> json) {
clinicId = json['clinicId']; clinicId = json['clinicId'];
@ -35,6 +37,7 @@ class GetRescheduleLeavesResponse {
requisitionType = json['requisitionType']; requisitionType = json['requisitionType'];
status = json['status']; status = json['status'];
createdOn = json['createdOn']; createdOn = json['createdOn'];
statusDescription = json['statusDescription'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -50,6 +53,7 @@ class GetRescheduleLeavesResponse {
data['requisitionType'] = this.requisitionType; data['requisitionType'] = this.requisitionType;
data['status'] = this.status; data['status'] = this.status;
data['createdOn'] = this.createdOn; data['createdOn'] = this.createdOn;
data['statusDescription'] = this.statusDescription;
return data; return data;
} }
} }

@ -29,7 +29,8 @@ class PatientModel {
bool IsLoginForDoctorApp; bool IsLoginForDoctorApp;
bool PatientOutSA; bool PatientOutSA;
int Searchtype; int Searchtype;
String IdentificationNo;
String MobileNo;
int get getProjectID => ProjectID; int get getProjectID => ProjectID;
set setProjectID(int ProjectID) => this.ProjectID = ProjectID; set setProjectID(int ProjectID) => this.ProjectID = ProjectID;
@ -132,7 +133,9 @@ class PatientModel {
this.SessionID, this.SessionID,
this.IsLoginForDoctorApp, this.IsLoginForDoctorApp,
this.PatientOutSA, this.PatientOutSA,
this.Searchtype}); this.Searchtype,
this.IdentificationNo,
this.MobileNo});
factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel( factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel(
FirstName: json["FirstName"], FirstName: json["FirstName"],
@ -162,6 +165,8 @@ class PatientModel {
data['IsLoginForDoctorApp'] = this.IsLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.IsLoginForDoctorApp;
data['PatientOutSA'] = this.PatientOutSA; data['PatientOutSA'] = this.PatientOutSA;
data['Searchtype'] = this.Searchtype; data['Searchtype'] = this.Searchtype;
data['IdentificationNo'] = this.IdentificationNo;
data['MobileNo'] = this.MobileNo;
return data; return data;
} }
} }

@ -7,7 +7,7 @@ class GetAllSickLeaveResponse {
int requestNo; int requestNo;
String startDate; String startDate;
int status; int status;
String statusDescription;
GetAllSickLeaveResponse( GetAllSickLeaveResponse(
{this.appointmentNo, {this.appointmentNo,
this.isExtendedLeave, this.isExtendedLeave,
@ -16,7 +16,8 @@ class GetAllSickLeaveResponse {
this.remarks, this.remarks,
this.requestNo, this.requestNo,
this.startDate, this.startDate,
this.status}); this.status,
this.statusDescription});
GetAllSickLeaveResponse.fromJson(Map<String, dynamic> json) { GetAllSickLeaveResponse.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];
@ -27,6 +28,7 @@ class GetAllSickLeaveResponse {
requestNo = json['requestNo']; requestNo = json['requestNo'];
startDate = json['startDate']; startDate = json['startDate'];
status = json['status']; status = json['status'];
statusDescription = json['statusDescription'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -39,6 +41,7 @@ class GetAllSickLeaveResponse {
data['requestNo'] = this.requestNo; data['requestNo'] = this.requestNo;
data['startDate'] = this.startDate; data['startDate'] = this.startDate;
data['status'] = this.status; data['status'] = this.status;
data['statusDescription'] = this.statusDescription;
return data; return data;
} }
} }

@ -79,8 +79,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
PatientID: 0, PatientID: 0,
From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(), .toString(),
To: DateUtils.convertDateToFormat( To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
DateTime.now().add(Duration(days: 6, hours: 0)), 'yyyy-MM-dd')
.toString(), .toString(),
LanguageID: 2, LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z", stamp: "2020-03-02T13:56:39.170Z",

@ -72,25 +72,27 @@ class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen>
indicatorColor: Colors.red[800], indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), EdgeInsets.only(top: 4.0, left: 30.0, right: 30.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).searchPatient, TranslationBase.of(context).searchPatient,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14,
), ),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).searchMedicine, TranslationBase.of(context).searchMedicine,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14,
color: Colors.black), color: Colors.black),
), ),
), ),

@ -56,6 +56,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
LastName: "0", LastName: "0",
PatientMobileNumber: "0", PatientMobileNumber: "0",
PatientIdentificationID: "0", PatientIdentificationID: "0",
MobileNo: '0',
PatientID: 0, PatientID: 0,
From: "0", From: "0",
To: "0", To: "0",
@ -67,6 +68,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", TokenID: "2Fi7HoIHB0eDyekVa6tCJg==",
SessionID: "5G0yXn0Jnq", SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true, IsLoginForDoctorApp: true,
IdentificationNo: '0',
PatientOutSA: false); PatientOutSA: false);
void _validateInputs() async { void _validateInputs() async {
@ -180,54 +182,78 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
width: 1.0, color: HexColor("#CCCCCC"))), width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: labelText: TranslationBase.of(context)
TranslationBase.of(context).patientID, .patpatientIDMobilenationalientID,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1, focusNode: _nodeText1,
onSaved: (value) { onSaved: (value) {
value == null || value == '' if (value != null && value != '') {
? _patientSearchFormValues.setPatientID = if (value.length == 10 &&
0 (value[0] == '2' || value[0] == '1')) {
: _patientSearchFormValues.setPatientID = _patientSearchFormValues
.IdentificationNo = value;
_patientSearchFormValues.Searchtype = 2;
_patientSearchFormValues.setPatientID = 0;
} else if ((value.length == 10 ||
value.length == 9) &&
(value[0] == '05' || value[0] == '5')) {
_patientSearchFormValues.MobileNo = value;
_patientSearchFormValues.Searchtype = 0;
_patientSearchFormValues.setPatientID = 0;
} else {
_patientSearchFormValues.setPatientID =
int.parse(value); int.parse(value);
_patientSearchFormValues.Searchtype = 1;
if (value != null && }
value.toString().trim().isEmpty) {
_patientSearchFormValues.setPatientID = 0;
} }
// else{
// }
// value == null || value == ''
// ? _patientSearchFormValues.setPatientID =
// 0
// : _patientSearchFormValues.setPatientID =
// int.parse(value);
// if (value != null &&
// value.toString().trim().isEmpty) {
// _patientSearchFormValues.setPatientID = 0;
// }
}, },
), ),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
children: [ // children: [
InkWell( // InkWell(
child: this.isView == false // child: this.isView == false
? AppText( // ? AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.searchWithOther, // .searchWithOther,
color: Colors.red, // color: Colors.red,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
) // )
: AppText( // : AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.hideOtherCriteria, // .hideOtherCriteria,
color: Colors.red, // color: Colors.red,
fontWeight: FontWeight.bold), // fontWeight: FontWeight.bold),
onTap: () { // onTap: () {
setState(() { // setState(() {
this.isView = !this.isView; // this.isView = !this.isView;
}); // });
}, // },
) // )
], // ],
), // ),
isView == true isView == true
? Column(children: [ ? Column(children: [
SizedBox( SizedBox(

@ -16,6 +16,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart'; import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -83,7 +84,26 @@ class _PatientsScreenState extends State<PatientsScreen> {
final _controller = TextEditingController(); final _controller = TextEditingController();
PatientModel patient; PatientModel patient;
var _patientSearchFormValues = PatientModel(
FirstName: "0",
MiddleName: "0",
LastName: "0",
PatientMobileNumber: "0",
PatientIdentificationID: "0",
PatientID: 0,
From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(),
To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(),
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
Channel: 9,
TokenID: "2Fi7HoIHB0eDyekVa6tCJg==",
SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true,
PatientOutSA: false);
searchData(String str) { searchData(String str) {
this.responseModelList = this.responseModelList2; this.responseModelList = this.responseModelList2;
var strExist = str.length > 0 ? true : false; var strExist = str.length > 0 ? true : false;
@ -250,7 +270,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
} }
if (routeArgs != null && routeArgs.containsKey("isSearch")) { if (routeArgs != null && routeArgs.containsKey("isSearch")) {
isView = routeArgs['isView']; isView = routeArgs['isView'];
patient.Searchtype = 1; //patient.Searchtype = 1;
}
if (routeArgs != null && routeArgs.containsKey('activeFilter')) {
_activeLocation = routeArgs['activeFilter'];
} }
if (!projectsProvider.isArabic) if (!projectsProvider.isArabic)
@ -310,34 +333,34 @@ class _PatientsScreenState extends State<PatientsScreen> {
} }
parsed = lItems; parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list; responseModelList = new ModelResponse.fromJson(parsed).list;
//if (val2 == 7) { if (val2 == 7) {
responseModelList.sort((a, b) { responseModelList.sort((a, b) {
if (b.startTime != null && b.startTime != null) { if (b.startTime != null && b.startTime != null) {
try { try {
DateTime now = DateTime.now(); DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm"); DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate = String formattedDate =
DateFormat('yyyy-MM-dd ' + a.startTime).format(now); DateFormat('yyyy-MM-dd ' + a.startTime).format(now);
DateTime dateTimeA = dateFormat.parse(formattedDate); DateTime dateTimeA = dateFormat.parse(formattedDate);
String formattedDateB = String formattedDateB =
DateFormat('yyyy-MM-dd ' + b.startTime).format(now); DateFormat('yyyy-MM-dd ' + b.startTime).format(now);
DateTime dateTimeB = dateFormat.parse(formattedDateB); DateTime dateTimeB = dateFormat.parse(formattedDateB);
var adate = dateTimeA; //a.startTime; var adate = dateTimeA; //a.startTime;
var bdate = dateTimeB; var bdate = dateTimeB;
return adate.compareTo(bdate); return adate.compareTo(bdate);
} on Exception catch (_) { } on Exception catch (_) {
print('never reached'); print('never reached');
var adate = a.startTime; //a.startTime; var adate = a.startTime; //a.startTime;
var bdate = b.startTime; var bdate = b.startTime;
return adate.compareTo(bdate); return adate.compareTo(bdate);
}
} else {
var adate = convertDateFormat(a.appointmentDate);
var bdate = convertDateFormat(b.appointmentDate);
return bdate.compareTo(adate);
} }
} else { });
var adate = convertDateFormat(a.appointmentDate); }
var bdate = convertDateFormat(b.appointmentDate);
return bdate.compareTo(adate);
}
});
//}
responseModelList2 = responseModelList; responseModelList2 = responseModelList;
_isError = false; _isError = false;
} else { } else {
@ -540,48 +563,74 @@ class _PatientsScreenState extends State<PatientsScreen> {
// color: Color(0xffCCCCCC), // color: Color(0xffCCCCCC),
// ), // ),
Container( Container(
// decoration: BoxDecoration( // decoration: BoxDecoration(
// color: Color(0Xffffffff), // color: Color(0Xffffffff),
// borderRadius: // borderRadius:
// BorderRadius.circular(20)), // BorderRadius.circular(20)),
child: (responseModelList.length > 0) child: (responseModelList.length >
? Column( 0)
// mainAxisAlignment: MainAxisAlignment.center, ? Column(
children: responseModelList // mainAxisAlignment: MainAxisAlignment.center,
.map((PatiantInformtion children: responseModelList
item) { .map((PatiantInformtion
return PatientCard( item) {
patientInfo: item, return PatientCard(
patientType: patientType, patientInfo: item,
arrivalType: arrivalType, patientType:
onTap: () { patientType,
Navigator.of(context) arrivalType:
.pushNamed( arrivalType,
PATIENTS_PROFILE, onTap: () {
arguments: { Navigator.of(context)
"patient": item, .pushNamed(
"patientType": PATIENTS_PROFILE,
patientType, arguments: {
"from": patient "patient": item,
.getFrom, "patientType":
"to": patientType,
patient.getTo, "from": patient
"isSearch": .getFrom,
isSearch, "to": patient
"arrivalType": .getTo,
arrivalType, "isSearch":
}); isSearch,
}, "arrivalType":
); arrivalType,
}).toList(), });
) },
: Center( );
child: DrAppEmbeddedError( }).toList(),
error: TranslationBase.of( )
context) : Center(
.youDontHaveAnyPatient), child: Column(
), crossAxisAlignment:
), CrossAxisAlignment
.center,
children: [
SizedBox(
height: 100,
),
Image.asset(
'assets/images/no-data.png'),
Padding(
padding:
const EdgeInsets
.all(8.0),
child: Texts(
TranslationBase.of(
context)
.youDontHaveAnyPatient),
)
],
),
)
// : Center(
// child: DrAppEmbeddedError(
// error: TranslationBase.of(
// context)
// .youDontHaveAnyPatient),
// ),
),
], ],
), ),
) )
@ -752,11 +801,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
)), )),
), ),
onTap: () { onTap: () {
filterBooking(item.toString()); //filterBooking(item.toString());
setState(() { setState(() {
_activeLocation = _locations.indexOf(item); _activeLocation = _locations.indexOf(item);
}); });
filterPatient(item.toString());
}), }),
_isActive _isActive
? Container( ? Container(
@ -775,4 +825,25 @@ class _PatientsScreenState extends State<PatientsScreen> {
), ),
); );
} }
filterPatient(item) {
if (item == 'Tomorrow') {
_patientSearchFormValues.To = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
'yyyy-MM-dd');
} else if (item == 'Next Week') {
_patientSearchFormValues.To = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 6),
'yyyy-MM-dd');
}
Navigator.of(context).pop();
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": "7",
"arrivalType": "1",
"activeFilter": _activeLocation
});
}
} }

@ -1264,75 +1264,68 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
if (formKey.currentState if (formKey.currentState
.validate()) { .validate()) {
Navigator.pop(context); Navigator.pop(context);
//openDrugToDrug(model); openDrugToDrug(model);
{ {
// var x = model // postProcedure(
// .patientAssessmentList // icdCode: model
// .map((value) => // .patientAssessmentList
// value.icdCode10ID) // .isNotEmpty
// .toList() // ? model
// .join(','); // .patientAssessmentList[
// 0]
postProcedure( // .icdCode10ID
icdCode: model // .isEmpty
.patientAssessmentList // ? "test"
.isNotEmpty // : model
? model // .patientAssessmentList[
.patientAssessmentList[ // 0]
0] // .icdCode10ID
.icdCode10ID // .toString()
.isEmpty // : "test",
? "test" // // icdCode: model
: model // // .patientAssessmentList
.patientAssessmentList[ // // .map((value) => value
0] // // .icdCode10ID
.icdCode10ID // // .trim())
.toString() // // .toList()
: "test", // // .join(' '),
// icdCode: model // dose:
// .patientAssessmentList // strengthController
// .map((value) => value // .text,
// .icdCode10ID // doseUnit: units[
// .trim()) // 'parameterCode']
// .toList() // .toString(),
// .join(' '), // patient:
dose: // widget.patient,
strengthController // doseTimeIn:
.text, // doseTime['id']
doseUnit: units[ // .toString(),
'parameterCode'] // model: widget.model,
.toString(), // duration:
patient: // duration['id']
widget.patient, // .toString(),
doseTimeIn: // frequency: frequency[
doseTime['id'] // 'parameterCode']
.toString(), // .toString(),
model: widget.model, // route: route[
duration: // 'parameterCode']
duration['id'] // .toString(),
.toString(), // drugId:
frequency: frequency[ // _selectedMedication
'parameterCode'] // .itemId
.toString(), // .toString(),
route: route[ // strength:
'parameterCode'] // strengthController
.toString(), // .text,
drugId: // indication:
_selectedMedication // indicationController
.itemId // .text,
.toString(), // instruction:
strength: // instructionController
strengthController // .text,
.text, // doseTime:
indication: // selectedDate,
indicationController // );
.text,
instruction:
instructionController
.text,
doseTime:
selectedDate,
);
} }
} }
@ -1432,7 +1425,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
context: context, context: context,
builder: (context) { builder: (context) {
return Container( return Container(
height: SizeConfig.realScreenHeight * .5, height: SizeConfig.realScreenHeight * .8,
width: SizeConfig.realScreenWidth, width: SizeConfig.realScreenWidth,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
@ -1448,6 +1441,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
title: TranslationBase.of(context).addMedication, title: TranslationBase.of(context).addMedication,
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
postProcedure( postProcedure(
icdCode: model.patientAssessmentList.isNotEmpty icdCode: model.patientAssessmentList.isNotEmpty
? model.patientAssessmentList[0].icdCode10ID ? model.patientAssessmentList[0].icdCode10ID
@ -1477,6 +1471,36 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
instruction: instructionController.text, instruction: instructionController.text,
doseTime: selectedDate, doseTime: selectedDate,
); );
// postProcedure(
// icdCode: model.patientAssessmentList.isNotEmpty
// ? model.patientAssessmentList[0].icdCode10ID
// .isEmpty
// ? "test"
// : model.patientAssessmentList[0].icdCode10ID
// .toString()
// : "test",
// // icdCode: model
// // .patientAssessmentList
// // .map((value) => value
// // .icdCode10ID
// // .trim())
// // .toList()
// // .join(' '),
// dose: strengthController.text,
// doseUnit: units['parameterCode'].toString(),
// patient: widget.patient,
// doseTimeIn: doseTime['id'].toString(),
// model: widget.model,
// duration: duration['id'].toString(),
// frequency: frequency['parameterCode'].toString(),
// route: route['parameterCode'].toString(),
// drugId: _selectedMedication.itemId.toString(),
// strength: strengthController.text,
// indication: indicationController.text,
// instruction: instructionController.text,
// doseTime: selectedDate,
// );
}, },
)) ))
], ],

@ -80,11 +80,11 @@ class AddRescheduleLeavScreen extends StatelessWidget {
border: Border( border: Border(
left: BorderSide( left: BorderSide(
color: item.status == 10 color: item.status == 10
? Colors.green ? Colors.red[800]
: item.status == 2 : item.status == 2
? HexColor('#CC9B14') ? HexColor('#CC9B14')
: item.status == 9 : item.status == 9
? Colors.red[800] ? Colors.green
: Colors.red, : Colors.red,
width: 5.0, width: 5.0,
))), ))),
@ -109,29 +109,14 @@ class AddRescheduleLeavScreen extends StatelessWidget {
margin: margin:
EdgeInsets.only(top: 10), EdgeInsets.only(top: 10),
child: AppText( child: AppText(
item.status == 10 item.statusDescription,
? TranslationBase.of(
context)
.accepted
: item.status == 2
? TranslationBase.of(
context)
.pending
: item.status == 9
? TranslationBase
.of(
context)
.rejected
: TranslationBase
.of(context)
.cancelled,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: item.status == 10 color: item.status == 10
? Colors.green ? Colors.red[800]
: item.status == 2 : item.status == 2
? HexColor('#CC9B14') ? HexColor('#CC9B14')
: item.status == 9 : item.status == 9
? Colors.red[800] ? Colors.green
: Colors.red, : Colors.red,
fontSize: 14, fontSize: 14,
), ),

@ -243,21 +243,21 @@ class AddSickLeavScreen extends StatelessWidget {
) )
: patient.patientStatusType != 43 : patient.patientStatusType != 43
? Center( ? Center(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: 100,), SizedBox(
Image.asset('assets/images/no-data.png'), height: 100,
Padding( ),
padding: const EdgeInsets.all(8.0), Image.asset('assets/images/no-data.png'),
child: Texts('No Sick Leave Found'), Padding(
) padding: const EdgeInsets.all(8.0),
child: Texts('No Sick Leave Found'),
], )
), ],
) ),
)
: SizedBox() : SizedBox()
])))); ]))));
} }

@ -128,8 +128,7 @@ class ShowSickLeaveScreen extends StatelessWidget {
AppText( AppText(
item.remarks ?? "", item.remarks ?? "",
), ),
(item.status == 1 || (item.status == 1)
item.status == 2)
? IconButton( ? IconButton(
icon: Image.asset( icon: Image.asset(
'assets/images/edit.png'), 'assets/images/edit.png'),

@ -423,6 +423,10 @@ class Helpers {
} }
static String capitalize(str) { static String capitalize(str) {
return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}"; if (str != "") {
return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}";
} else {
return str;
}
} }
} }

@ -624,8 +624,7 @@ class TranslationBase {
String get applyOrRescheduleLeave => String get applyOrRescheduleLeave =>
localizedValues['applyOrRescheduleLeave'][locale.languageCode]; localizedValues['applyOrRescheduleLeave'][locale.languageCode];
String get myQRCode => String get myQRCode => localizedValues['myQRCode'][locale.languageCode];
localizedValues['myQRCode'][locale.languageCode];
String get addMedication => String get addMedication =>
localizedValues['addMedication'][locale.languageCode]; localizedValues['addMedication'][locale.languageCode];
@ -1216,13 +1215,16 @@ class TranslationBase {
String get remove => localizedValues['remove'][locale.languageCode]; String get remove => localizedValues['remove'][locale.languageCode];
String get step => localizedValues['step'][locale.languageCode]; String get step => localizedValues['step'][locale.languageCode];
String get fieldRequired => localizedValues['fieldRequired'][locale.languageCode]; String get fieldRequired =>
localizedValues['fieldRequired'][locale.languageCode];
String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode];
String get changeOfSchedule => String get changeOfSchedule =>
localizedValues['changeOfSchedule'][locale.languageCode]; localizedValues['changeOfSchedule'][locale.languageCode];
String get newSchedule => localizedValues['newSchedule'][locale.languageCode]; String get newSchedule => localizedValues['newSchedule'][locale.languageCode];
String get enterCredentials => String get enterCredentials =>
localizedValues['enter_credentials'][locale.languageCode]; localizedValues['enter_credentials'][locale.languageCode];
String get patpatientIDMobilenationalientID =>
localizedValues['patientIDMobilenational'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -857,7 +857,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
authProv.setDoctorProfile(doctor); authProv.setDoctorProfile(doctor);
sharedPref.setObj(DOCTOR_PROFILE, profile); sharedPref.setObj(DOCTOR_PROFILE, profile);
projectsProvider.isLogin = true; projectsProvider.isLogin = true;
Navigator.of(context).pushReplacementNamed(HOME);
Navigator.of(context).popAndPushNamed(HOME);
} }
getDocProfiles(ClinicModel clinicInfo, authProv) { getDocProfiles(ClinicModel clinicInfo, authProv) {

@ -129,14 +129,17 @@ class PatientCard extends StatelessWidget {
children: [ children: [
AppText( AppText(
patientInfo.nationalityName != null patientInfo.nationalityName != null
? patientInfo.nationalityName ? patientInfo.nationalityName.trim()
: patientInfo.nationality != null : patientInfo.nationality != null
? patientInfo.nationality ? patientInfo.nationality.trim()
: "", : patientInfo.nationalityId != null
? patientInfo.nationalityId
: "",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
patientInfo.nationality != null patientInfo.nationality != null ||
patientInfo.nationalityId != null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius:
BorderRadius.circular(20.0), BorderRadius.circular(20.0),

@ -17,7 +17,8 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
final double height; final double height;
PatientProfileHeaderNewDesign( PatientProfileHeaderNewDesign(
this.patient, this.patientType, this.arrivalType, {this.height = 0.0}); this.patient, this.patientType, this.arrivalType,
{this.height = 0.0});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -155,7 +156,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
color: HexColor("#20A169"), color: HexColor("#20A169"),
), ),
child: AppText( child: AppText(
patient.startTime??"", patient.startTime ?? "",
color: Colors.white, color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -208,7 +209,10 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
patient.nationalityName ?? patient.nationality?? patient.nationalityId ?? '', patient.nationalityName ??
patient.nationality ??
patient.nationalityId ??
'',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),

Loading…
Cancel
Save