hot fixes

merge-requests/591/head
Mohammad Aljammal 5 years ago
parent 55c63c9531
commit 357e01c846

@ -782,7 +782,7 @@ const Map<String, Map<String, String>> localizedValues = {
},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"},
"open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"},
"open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"},
'fileNumber': {'en': "File Number: ", 'ar': " :رقم الملف"},
'searchPatient-name': {

@ -125,7 +125,7 @@ class FinalRadiology {
orderNo = json['OrderNo'];
projectName = json['ProjectName'];
qR = json['QR'];
isLiveCareAppodynamicment = json['IsLiveCareAppodynamicment'];
isLiveCareAppodynamicment = json['IsLiveCareAppointment'];
reportDataHTML = json['ReportDataHTML'];
reportDataTextdynamic = json['ReportDataTextdynamic'];
// speciality = json['Speciality'].cast<dynamic>();

@ -71,14 +71,19 @@ class VitalSignsService extends BaseService {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientID'] = patient.patientId;
body['PatientTypeID'] = 1;
if(isInPatient){
body['InOutPatientType'] = 1;
}else {
body['InOutPatientType'] = 2;
body['PatientTypeID'] = patient.patientType;
// if(isInPatient){
body['InOutPatientType'] = 0;
// }else {
// body['InOutPatientType'] = 2;
// }
if (patient.appointmentNo != null && patient.projectId != null) {
body['TransNo'] = patient.appointmentNo;
body['ProjectID'] = patient.projectId;
}
await baseAppClient.post(
await baseAppClient.postPatient(
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear();
@ -93,6 +98,7 @@ class VitalSignsService extends BaseService {
super.error = error.toString();
},
body: body,
patient: patient
);
}
}

@ -52,12 +52,13 @@ class VitalSignsViewModel extends BaseViewModel {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
await _vitalSignService.getInPatientVitalSignHistory(patient, isInPatient);
// if (isInPatient) {
// await _vitalSignService.getInPatientVitalSignHistory(patient, isInPatient);
// } else {
// await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
// }
if (isInPatient) {
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
} else {
await _vitalSignService.getInPatientVitalSignHistory(patient, isInPatient);
}
if (_vitalSignService.hasError) {
error = _vitalSignService.error;

@ -64,6 +64,7 @@ class MyReferredPatientModel {
String referralClinicDescription;
String referringDoctorName;
bool isReferralDoctorSameBranch;
String referralStatusDesc;
MyReferredPatientModel({
this.rowID,
@ -128,7 +129,7 @@ class MyReferredPatientModel {
this.referringDoctorName,
this.isReferralDoctorSameBranch,
this.referralDoctorName,
this.referralClinicDescription,
this.referralClinicDescription,this.referralStatusDesc
});
MyReferredPatientModel.fromJson(Map<String, dynamic> json) {
@ -194,6 +195,7 @@ class MyReferredPatientModel {
referringDoctorName = json['ReferringDoctorName'];
referralDoctorName = json['ReferralDoctorName'];
referralClinicDescription = json['ReferralClinicDescription'];
referralStatusDesc = json['ReferralStatusDesc'];
}
Map<String, dynamic> toJson() {

@ -3,6 +3,7 @@ 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/screens/patients/profile/lab_result/laboratory_result_page.dart';
import 'package:doctor_app_flutter/screens/procedures/add_lab_orders.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -37,7 +38,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
@override
Widget build(BuildContext context) {
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getLabs(patient, isInpatient: isInpatient),
onModelReady: (model) => model.getLabs(patient, isInpatient: false),
builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model,
backgroundColor: Colors.grey[100],
@ -105,42 +106,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
)),
);
},label: 'Apply for New Lab Order',),
if(!isInpatient)
Container(
margin: EdgeInsets.only(right: 8),
width: double.maxFinite,
child: InkWell(
onTap: (){
setState(() {
isInpatient= true;
});
model.getLabs(patient, isInpatient: true);
},
child: Align(
alignment: Alignment.centerRight,
child: AppText('View Inpatient Lab Result',
textDecoration:TextDecoration.underline,color: Colors.red,),
),
),
),
if(isInpatient)
Container(
width: double.maxFinite,
margin: EdgeInsets.only(right: 8),
child: InkWell(
onTap: (){
setState(() {
isInpatient= false;
});
model.getLabs(patient, isInpatient: false);
},
child: Align(
alignment: Alignment.centerRight,
child: AppText('View Outpatient Lab Result',
textDecoration:TextDecoration.underline,color: Colors.red,),
),
),
),
...List.generate(
model.patientLabOrdersList.length,
(index) => Column(
@ -149,26 +115,80 @@ class _LabsHomePageState extends State<LabsHomePage> {
children: model
.patientLabOrdersList[index].patientLabOrdersList
.map((labOrder) {
return DoctorCard(
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: labOrder,
patient: patient,
arrivalType: arrivalType,
patientType: patientType,
return Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
color: Colors.white),
child: Row(
children: [
Container(
width: 20,
height: 160,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: labOrder.isLiveCareAppointment
? Colors.red[900]
: !labOrder.isInOutPatient
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(8),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
labOrder.isLiveCareAppointment
? TranslationBase.of(context)
.liveCare
.toUpperCase()
: !labOrder.isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
),
Expanded(
child: DoctorCard(
isNoMargin: true,
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: labOrder,
patient: patient,
arrivalType: arrivalType,
patientType: patientType,
),
),
),
doctorName: labOrder.doctorName,
invoiceNO: ' ${labOrder.invoiceNo}',
profileUrl: labOrder.doctorImageURL,
branch: labOrder.projectName,
clinic: labOrder.clinicDescription,
appointmentDate: labOrder.orderDate,
orderNo: labOrder.orderNo,
isShowTime: false,
),
),
),
],
),
doctorName: labOrder.doctorName,
invoiceNO: ' ${labOrder.invoiceNo}',
profileUrl: labOrder.doctorImageURL,
branch: labOrder.projectName,
clinic: labOrder.clinicDescription,
appointmentDate: labOrder.orderDate,
orderNo: labOrder.orderNo,
isShowTime: false,
);
}).toList(),
),

@ -64,17 +64,18 @@ class RadiologyDetailsPage extends StatelessWidget {
SizedBox(
height: 5,
),
AppText(TranslationBase.of(context).generalResult),
SizedBox(
height: 5,
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context).generalResult,color: Color(0xff2E303A),),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
'${finalRadiology.reportData.trim()}',
textAlign: TextAlign.start,
fontSize: 17,
color: Colors.grey,
color: Color(0xff575757),
),
),
SizedBox(
@ -94,8 +95,9 @@ class RadiologyDetailsPage extends StatelessWidget {
margin:
EdgeInsets.only(left: 35, right: 35, top: 12, bottom: 12),
child: SecondaryButton(
color: Colors.red[600],
color: Color(0xffD02127),
disabled: finalRadiology.dIAPACSURL == "",
textColor: Color(0xffFFFFFF),
onTap: () {
launch(model.radImageURL);
},

@ -4,6 +4,7 @@ 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/screens/patients/profile/radiology/radiology_details_page.dart';
import 'package:doctor_app_flutter/screens/procedures/add_radiology_order.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -24,6 +25,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
PatiantInformtion patient;
String arrivalType;
bool isInpatient;
@override
void didChangeDependencies() {
super.didChangeDependencies();
@ -38,8 +40,8 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
@override
Widget build(BuildContext context) {
return BaseView<ProcedureViewModel>(
onModelReady: (model) =>
model.getPatientRadOrders(patient, patientType: patientType, isInPatient: isInpatient),
onModelReady: (model) => model.getPatientRadOrders(patient,
patientType: patientType, isInPatient: false),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
backgroundColor: Colors.grey[100],
@ -112,63 +114,81 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
},
label: 'Apply for Radiology Order',
),
if(!isInpatient)
Container(
width: double.maxFinite,
margin: EdgeInsets.only(right: 8),
child: InkWell(
onTap: (){
setState(() {
isInpatient = true;
});
model.getPatientRadOrders(patient, patientType: patientType, isInPatient: true);
},
child: Align(
alignment: Alignment.centerRight,
child: AppText('View Inpatient Lab Result',
textDecoration:TextDecoration.underline,color: Colors.red,),
),
),
),
if(isInpatient)
Container(
margin: EdgeInsets.only(right: 8),
width: double.maxFinite,
child: InkWell(
onTap: (){
setState(() {
isInpatient = false;
});
model.getPatientRadOrders(patient, patientType: patientType, isInPatient: false);
},
child: Align(
alignment: Alignment.centerRight,
child: AppText('View Outpatient Lab Result',
textDecoration:TextDecoration.underline,color: Colors.red,),
),
),
),
...List.generate(
model.radiologyList.length,
(index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(
finalRadiology: model.radiologyList[index],
patient: patient,
(index) => Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
),
),
child: DoctorCard(
doctorName: model.radiologyList[index].doctorName,
profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
clinic: model.radiologyList[index].clinicDescription,
appointmentDate:
!isInpatient?model.radiologyList[index].orderDate :
model.radiologyList[index].reportDate,
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
color: Colors.white),
child: Row(
children: [
Container(
width: 20,
height: 160,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: model.radiologyList[index].isLiveCareAppodynamicment
? Colors.red[900]
: !model.radiologyList[index].isInOutPatient
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(8),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.radiologyList[index].isLiveCareAppodynamicment
? TranslationBase.of(context)
.liveCare
.toUpperCase()
: !model.radiologyList[index].isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
),
Expanded(
child: DoctorCard(
isNoMargin: true,
doctorName: model.radiologyList[index].doctorName,
profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
clinic: model.radiologyList[index].clinicDescription,
appointmentDate: !isInpatient
? model.radiologyList[index].orderDate
: model.radiologyList[index].reportDate,
onTap: () {
Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(
finalRadiology: model.radiologyList[index],
patient: patient,
),
),
);
},
),
),
],
),
)),
if (model.radiologyList.isEmpty &&

@ -66,8 +66,7 @@ class ReferredPatientScreen extends StatelessWidget {
);
},
child: PatientReferralItemWidget(
referralStatus:
"${model.getReferralStatusNameByCode(model.getReferredPatientItem(index).referralStatus, context)}",
referralStatus:model.getReferredPatientItem(index).referralStatusDesc,
referralStatusCode: model
.getReferredPatientItem(index)
.referralStatus,

@ -146,7 +146,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
AppText(
"${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}",
referredPatient.referralStatusDesc,
fontFamily: 'Poppins',
fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,

@ -284,118 +284,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Column(
//mainAxisAlignment: MainAxisAlignment.end,
children: [
// Container(
// height: MediaQuery.of(context).size.height *
// 0.070,
// color: Colors.white,
// child: InkWell(
// onTap: model.allMedicationList != null
// ? () {
// Helpers.hideKeyboard(context);
// setState(() {
// _selectedMedication = null;
// model.getItem(
// itemID: _selectedMedication
// .itemId);
// });
// }
// : null,
// child: _selectedMedication == null
// ? AutoCompleteTextField<
// GetMedicationResponseModel>(
// onFocusChanged: (__) {
// if (_selectedMedication !=
// null) {
// model.getItem(
// itemID:
// _selectedMedication
// .itemId);
// uom = _selectedMedication.uom;
// } else {
// null;
// }
// if (_selectedMedication !=
// null &&
// duration != null &&
// frequency != null &&
// strengthController.text !=
// null) {
// model.getBoxQuantity(
// freq: frequency[
// 'parameterCode'],
// duration: duration['id'],
// itemCode:
// _selectedMedication
// .itemId,
// strength: double.parse(
// strengthController
// .text));
// box = model.boxQuintity;
//
// return;
// }
// },
// decoration:
// textFieldSelectorDecoration(
// TranslationBase.of(context)
// .searchMedicineNameHere,
// _selectedMedication != null
// ? _selectedMedication
// .genericName
// : null,
// true,
// ),
// itemSubmitted: (item) => setState(
// () => _selectedMedication =
// item),
// key: key,
// suggestions:
// model.allMedicationList,
// itemBuilder: (context,
// suggestion) =>
// new Padding(
// child: AppText(suggestion
// .description +
// '/' +
// suggestion
// .genericName),
// padding:
// EdgeInsets.all(15.0)),
// itemSorter: (a, b) => 1,
// suggestionsAmount: 7,
// itemFilter: (suggestion, input) =>
// suggestion.genericName.toLowerCase().startsWith(
// input.toLowerCase()) ||
// suggestion.description
// .toLowerCase()
// .startsWith(input
// .toLowerCase()) ||
// suggestion.keywords
// .toLowerCase()
// .startsWith(
// input.toLowerCase()),
// )
// : TextField(
// onEditingComplete: () {
// model.getItem(
// itemID: _selectedMedication
// .itemId);
// },
// decoration: textFieldSelectorDecoration(
// TranslationBase.of(context)
// .searchMedicineNameHere,
// _selectedMedication != null
// ? _selectedMedication
// .description +
// ('${_selectedMedication.genericName}')
// : null,
// false,
// suffixIcon:
// Icon(Icons.search)),
// enabled: false,
// ),
// ),
// ),
FractionallySizedBox(
widthFactor: 0.9,
child: Container(

@ -238,11 +238,9 @@ class _SecondaryButtonState extends State<SecondaryButton>
widget.label,
style: TextStyle(
color: widget.textColor,
fontSize: widget.small ? 12.0 : 15.0,
// fontWeight: FontWeight.w800,
fontFamily: projectViewModel.isArabic
? 'Cairo'
: 'Poppins'),
fontSize: 16,
fontWeight: FontWeight.w700,
fontFamily: 'Poppins'),
),
)
],

@ -20,6 +20,7 @@ class DoctorCard extends StatelessWidget {
final String clinic;
final bool isShowEye;
final bool isShowTime;
final bool isNoMargin;
DoctorCard(
{this.doctorName,
@ -31,13 +32,13 @@ class DoctorCard extends StatelessWidget {
this.orderNo,
this.isPrescriptions = false,
this.clinic,
this.isShowEye = true, this.isShowTime= true});
this.isShowEye = true, this.isShowTime= true, this.isNoMargin =false});
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
margin: EdgeInsets.all(10),
margin: EdgeInsets.all(!isNoMargin? 10:0),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,

Loading…
Cancel
Save