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

 Conflicts:
	pubspec.lock
merge-requests/847/head
Elham Rababh 4 years ago
commit 8be6bd257d

@ -10,6 +10,8 @@ class LabResult {
String projectID;
String referanceRange;
String resultValue;
String maxValue;
String minValue;
String sampleCollectedOn;
String sampleReceivedOn;
String setupID;
@ -21,24 +23,26 @@ class LabResult {
LabResult(
{this.description,
this.femaleInterpretativeData,
this.gender,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
this.femaleInterpretativeData,
this.gender,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.maxValue,
this.minValue,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
LabResult.fromJson(Map<String, dynamic> json) {
description = json['Description'];
@ -52,6 +56,8 @@ class LabResult {
projectID = json['ProjectID'].toString();
referanceRange = json['ReferenceRange'] ?? json['ReferanceRange'];
resultValue = json['ResultValue'];
maxValue = json['MaxValue'];
minValue = json['MinValue'];
sampleCollectedOn = json['SampleCollectedOn'];
sampleReceivedOn = json['SampleReceivedOn'];
setupID = json['SetupID'];
@ -75,6 +81,8 @@ class LabResult {
data['ProjectID'] = this.projectID;
data['ReferanceRange'] = this.referanceRange;
data['ResultValue'] = this.resultValue;
data['MaxValue'] = this.maxValue;
data['MinValue'] = this.minValue;
data['SampleCollectedOn'] = this.sampleCollectedOn;
data['SampleReceivedOn'] = this.sampleReceivedOn;
data['SetupID'] = this.setupID;
@ -85,8 +93,29 @@ class LabResult {
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
return data;
}
}
int checkResultStatus() {
try {
var max = double.tryParse(maxValue) ?? null;
var min = double.tryParse(minValue) ?? null;
var result = double.tryParse(resultValue) ?? null;
if (max != null && min != null && result != null) {
if (result > max) {
return 1;
} else if (result < min) {
return -1;
} else {
return 0;
}
} else {
return 0;
}
}catch (e){
return 0;
}
}
}
class LabResultList {
String filterName = "";

@ -8,8 +8,8 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
class UcafService extends LookupService {
List<GetChiefComplaintResModel> patientChiefComplaintList = [];
List<VitalSignHistory> patientVitalSignsHistory = [];
List<GetChiefComplaintResModel> patientChiefComplaintList;
List<VitalSignHistory> patientVitalSignsHistory;
List<GetAssessmentResModel> patientAssessmentList = [];
List<OrderProcedure> orderProcedureList = [];
PrescriptionModel prescriptionList;
@ -17,15 +17,20 @@ class UcafService extends LookupService {
Future getPatientChiefComplaint(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN ;
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo ;
body['EpisodeID'] = patient.episodeNo;
body['DoctorID'] = "";
patientChiefComplaintList = null;
await baseAppClient.post(GET_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
patientChiefComplaintList.clear();
if (patientChiefComplaintList != null) {
patientChiefComplaintList.clear();
} else {
patientChiefComplaintList = new List();
}
response['List_ChiefComplaint']['entityList'].forEach((v) {
patientChiefComplaintList.add(GetChiefComplaintResModel.fromJson(v));
});
@ -47,10 +52,15 @@ class UcafService extends LookupService {
body['InOutPatientType'] = 2;
}
patientVitalSignsHistory = null;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear();
if (patientVitalSignsHistory != null) {
patientVitalSignsHistory.clear();
} else {
patientVitalSignsHistory = new List();
}
if (response['List_DoctorPatientVitalSign'] != null) {
response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));
@ -79,10 +89,15 @@ class UcafService extends LookupService {
body['From'] = fromDate;
body['To'] = toDate;
patientVitalSignsHistory = null;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN_DATA,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear();
if (patientVitalSignsHistory != null) {
patientVitalSignsHistory.clear();
} else {
patientVitalSignsHistory = new List();
}
if (response['VitalSignsHistory'] != null) {
response['VitalSignsHistory'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));

@ -45,12 +45,12 @@ class UcafViewModel extends BaseViewModel {
String temperatureCelcius = "0";
String hartRat = "0";
String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0";
String bloodPressure = "0/0";
resetDataInFirst({bool firstPage = true}) {
if(firstPage){
_ucafService.patientVitalSignsHistory = [];
_ucafService.patientChiefComplaintList = [];
_ucafService.patientVitalSignsHistory = null;
_ucafService.patientChiefComplaintList = null;
}
_ucafService.patientAssessmentList = [];
_ucafService.orderProcedureList = [];

@ -88,10 +88,10 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
if (index == 1)
return RoundedContainer(
raduis: 16,
showBorder: true,
showBorder: false,
borderColor: Colors.white,
shadowWidth: 0.2,
shadowSpreadRadius: 3,
shadowWidth: 0.1,
shadowSpreadRadius: 2,
shadowDy: 1,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding(
@ -100,10 +100,10 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
if (index == 0)
return RoundedContainer(
raduis: 16,
showBorder: true,
showBorder: false,
borderColor: Colors.white,
shadowWidth: 0.2,
shadowSpreadRadius: 3,
shadowWidth: 0.1,
shadowSpreadRadius: 2,
shadowDy: 1,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding(
@ -112,10 +112,10 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
if (index == 2)
return RoundedContainer(
raduis: 16,
showBorder: true,
showBorder: false,
borderColor: Colors.white,
shadowWidth: 0.2,
shadowSpreadRadius: 3,
shadowWidth: 0.1,
shadowSpreadRadius: 2,
shadowDy: 1,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child:

@ -59,9 +59,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: MediaQuery.of(context).size.height * 0.070,
),
SizedBox(
height: 12,
),
@ -70,7 +68,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
onChangeFun: (value) {
model.searchData(value);
},
marginTop: 5,
marginTop: 0,
suffixIcon: IconButton(
icon: Icon(
DoctorApp.filter_1,

@ -8,15 +8,11 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/order-procedure.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/screens/patients/profile/UCAF/page-stepper-widget.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/ucaf_pager_screen.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/profile/patient-profile-app-bar.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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';

@ -71,7 +71,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
body: model.patientVitalSignsHistory.length > 0 &&
body: model.patientVitalSignsHistory != null &&
model.patientVitalSignsHistory.length > 0 &&
model.patientChiefComplaintList != null &&
model.patientChiefComplaintList.length > 0
? Column(
@ -380,30 +381,33 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
),
],
)
: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
: model.patientChiefComplaintList != null ||
model.patientVitalSignsHistory != null
? Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
model.patientVitalSignsHistory == null || model.patientVitalSignsHistory.length == 0
? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context)
.chiefComplaintEmptyMsg,
fontWeight: FontWeight.normal,
textAlign: TextAlign.center,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
)
],
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
model.patientVitalSignsHistory.length == 0
? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context)
.chiefComplaintEmptyMsg,
fontWeight: FontWeight.normal,
textAlign: TextAlign.center,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
)
],
),
),
)
: Container(),
),
);
}

@ -119,141 +119,148 @@ class LabResultWidget extends StatelessWidget {
)
],
),
SizedBox(
height: 4,
),
Divider(
color: Colors.black,
color: Colors.grey.shade500,
thickness: 1,
),
SizedBox(
height: 12,
),
...List.generate(
patientLabResultList.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFF2F2F2),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: Row(
children: [
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Center(
child: AppText(
/*'${patientLabResultList[index].testCode}\n' +*/
patientLabResultList[index].description,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
),
ListView.builder(
itemCount: patientLabResultList.length,
scrollDirection: Axis.vertical,
physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0X55F2F2F2),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
Expanded(
child: Row(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red.shade700,
// borderRadius: BorderRadius.all(
// Radius.circular(25.0),
// ),
),
child: Icon(
Icons.arrow_circle_up_sharp,
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Center(
child: AppText(
patientLabResultList[index].resultValue ??
"" +
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center,
isCopyable: true,
fontSize: SizeConfig.textMultiplier * 1.8,
),
child: Row(
children: [
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Center(
child: AppText(
/*'${patientLabResultList[index].testCode}\n' +*/
patientLabResultList[index].description,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
),
),
],
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
// color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
),
),
),
Expanded(
child: Container(
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.red.shade700,
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
if(patientLabResultList[index].checkResultStatus() != 0)
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red.shade700,
// borderRadius: BorderRadius.all(
// Radius.circular(25.0),
// ),
),
child: Icon(
patientLabResultList[index].checkResultStatus() == 1 ? Icons.arrow_upward : Icons.arrow_downward,
color: Colors.white,
size: 16,
),
),
Expanded(
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
vertical: 10, horizontal: 4),
child: Center(
child: AppText(
patientLabResultList[index].resultValue ??
"" +
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center,
isCopyable: true,
fontSize: SizeConfig.textMultiplier * 1.8,
),
),
),
),
],
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
// color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
),
),
),
Expanded(
child: Container(
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.red.shade700,
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
),
],
),
),
),
),
],
),
],
),
),
SizedBox(
height: 4,
),
],
),
),
),
SizedBox(
height: 16,
),
],
);
}),
SizedBox(
height: 6,
height: 8,
),
Divider(),
// Table(

@ -83,6 +83,7 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
),
),
ListView.builder(
physics: NeverScrollableScrollPhysics(),
itemCount: model.allSpecialLabList.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,

@ -131,19 +131,23 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
...List.generate(
model.labResultLists.length,
(index) => LabResultWidget(
patientLabOrder: widget.patientLabOrder,
filterName: model
.labResultLists[index].filterName,
patientLabResultList: model
.labResultLists[index]
.patientLabResultList,
patient: widget.patient,
isInpatient: widget.isInpatient,
),
),
ListView.builder(
itemCount: model.labResultLists.length,
scrollDirection: Axis.vertical,
physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return LabResultWidget(
patientLabOrder: widget.patientLabOrder,
filterName: model
.labResultLists[index].filterName,
patientLabResultList: model
.labResultLists[index]
.patientLabResultList,
patient: widget.patient,
isInpatient: widget.isInpatient,
);
}),
],
),
),
@ -183,11 +187,12 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Expanded(
child: Container(
margin: EdgeInsets.only(
left: 10, right: 10),
left: 0, right: 0),
child: AppText(
TranslationBase.of(context)
.specialResult,
bold: true,
fontSize: SizeConfig.textMultiplier * 2.3,
bold: false,
))),
Container(
width: 25,

@ -141,7 +141,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
AppText(
"${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}",
fontFamily: 'Poppins',
fontSize: 1.9 * SizeConfig.textMultiplier,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,
color: referredPatient.referralStatus == 1
? Color(0xffc4aa54)
@ -155,7 +155,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF28353E),
)
],
@ -170,14 +170,14 @@ class ReferralPatientDetailScreen extends StatelessWidget {
TranslationBase.of(context).fileNumber,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontSize: 1.5 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
AppText(
"${referredPatient.patientID}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
],
@ -188,7 +188,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
)
],
@ -208,7 +208,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
"${TranslationBase.of(context).refClinic}: ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontSize: 1.5 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
@ -216,7 +216,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
referredPatient.referringClinicDescription,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -231,7 +231,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
TranslationBase.of(context).frequency + ": ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontSize: 1.5 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
@ -239,7 +239,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
referredPatient.frequencyDescription ?? '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -284,7 +284,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
TranslationBase.of(context).priority + ": ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontSize: 1.5 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
@ -292,7 +292,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
referredPatient.priorityDescription ?? '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -307,7 +307,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
TranslationBase.of(context).maxResponseTime + ": ",
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontSize: 1.5 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
Expanded(
@ -318,7 +318,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
: '',
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -347,7 +347,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
width: 30,
errorBuilder:
(BuildContext context, Object exception, StackTrace stackTrace) {
return Text('No Image');
return Text('');
},
))
: Container(

@ -32,193 +32,190 @@ class PrescriptionsPage extends StatelessWidget {
onModelReady: (model) => patient.admissionNo == null
? model.getPrescriptions(patient, patientType: patientType)
: model.getMedicationForInPatient(patient),
builder: (_, model, w) => NetworkBaseView(
baseViewModel: model,
child: AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
body: patient.admissionNo == null
? FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
SizedBox(
height: 12,
),
if (model.prescriptionsList.isNotEmpty && patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
body: patient.admissionNo == null
? FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
SizedBox(
height: 12,
),
if (model.prescriptionsList.isNotEmpty && patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
],
),
),
if (patient.patientStatusType != null && patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
],
),
),
if ((patient.patientStatusType != null && patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BaseAddProcedureTabPage(
patient: patient,
prescriptionModel: model,
procedureType: ProcedureType.PRESCRIPTION,
),
settings: RouteSettings(name: 'AddProcedureTabPage')),
);
},
label: TranslationBase.of(context).applyForNewPrescriptionsOrder,
),
...List.generate(
model.prescriptionsList.length,
(index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsPage(
prescriptions: model.prescriptionsList[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
),
),
],
),
child: DoctorCard(
doctorName: model.prescriptionsList[index].doctorName,
profileUrl: model.prescriptionsList[index].doctorImageURL,
branch: model.prescriptionsList[index].name,
clinic: model.prescriptionsList[index].clinicDescription,
isPrescriptions: true,
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
model.prescriptionsList[index].appointmentDate,
),
))),
if (model.prescriptionsList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
if (patient.patientStatusType != null && patient.patientStatusType == 43)
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orders,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).prescriptions,
bold: true,
fontSize: 22,
),
],
),
),
if ((patient.patientStatusType != null && patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BaseAddProcedureTabPage(
patient: patient,
prescriptionModel: model,
procedureType: ProcedureType.PRESCRIPTION,
child: AppText(TranslationBase.of(context).noPrescriptionsFound),
)
],
),
)
],
),
)
: NetworkBaseView(
baseViewModel: model,
child: FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
// SizedBox(
// height: 12,
// ),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.medicationForInPatient.length,
itemBuilder: (context, index) {
//model.medicationForInPatient.length,
return InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsInPatientPage(
prescriptionIndex: index,
prescriptions: model.medicationForInPatient[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
startOn: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].startDatetime,
),
settings: RouteSettings(name: 'AddProcedureTabPage')),
);
},
label: TranslationBase.of(context).applyForNewPrescriptionsOrder,
),
...List.generate(
model.prescriptionsList.length,
(index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsPage(
prescriptions: model.prescriptionsList[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
stopOn: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].stopDatetime,
),
),
),
child: DoctorCard(
doctorName: model.prescriptionsList[index].doctorName,
profileUrl: model.prescriptionsList[index].doctorImageURL,
branch: model.prescriptionsList[index].name,
clinic: model.prescriptionsList[index].clinicDescription,
isPrescriptions: true,
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
model.prescriptionsList[index].appointmentDate,
),
))),
if (model.prescriptionsList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
child: InPatientDoctorCard(
doctorName: model.medicationForInPatient[index].pHRItemDescription,
profileUrl: 'sss',
branch: 'hamza',
clinic: 'basheer',
isPrescriptions: true,
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].prescriptionDatetime,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context).noPrescriptionsFound),
)
],
createdBy: model.medicationForInPatient[index].doctorName.toString(),
));
}),
if (model.medicationForInPatient.length == 0)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
)
],
),
)
: NetworkBaseView(
baseViewModel: model,
child: FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
// SizedBox(
// height: 12,
// ),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.medicationForInPatient.length,
itemBuilder: (context, index) {
//model.medicationForInPatient.length,
return InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsInPatientPage(
prescriptionIndex: index,
prescriptions: model.medicationForInPatient[index],
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
startOn: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].startDatetime,
),
stopOn: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].stopDatetime,
),
),
),
),
child: InPatientDoctorCard(
doctorName: model.medicationForInPatient[index].pHRItemDescription,
profileUrl: 'sss',
branch: 'hamza',
clinic: 'basheer',
isPrescriptions: true,
appointmentDate: AppDateUtils.getDateTimeFromServerFormat(
model.medicationForInPatient[index].prescriptionDatetime,
),
createdBy: model.medicationForInPatient[index].doctorName.toString(),
));
}),
if (model.medicationForInPatient.length == 0)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context).noPrescriptionsFound),
)
],
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context).noPrescriptionsFound),
)
],
),
),
)),
));
],
),
)
],
),
),
)));
}
}

@ -26,7 +26,8 @@ class ProcedureCard extends StatelessWidget {
this.categoryID,
this.categoryName,
this.patient,
this.doctorID, this.isInpatient = false,
this.doctorID,
this.isInpatient = false,
}) : super(key: key);
@override
@ -47,22 +48,20 @@ class ProcedureCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: MediaQuery.of(context).size.height * .20,
height: MediaQuery.of(context).size.height * .212,
width: 5,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
color:
entityList.orderType == 0 ? Colors.black : Colors.red[500],
color: entityList.orderType == 0 ? Colors.black : Colors.red[500],
),
),
Expanded(
child: Container(
padding: EdgeInsets.only(
left: projectViewModel.isArabic ? 0 : 15,
right: projectViewModel.isArabic ? 15 : 0),
left: projectViewModel.isArabic ? 0 : 15, right: projectViewModel.isArabic ? 15 : 0),
child: InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -75,12 +74,8 @@ class ProcedureCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
entityList.orderType == 0
? 'Routine'
: 'Urgent',
color: entityList.orderType == 0
? Colors.black
: Colors.red[800],
entityList.orderType == 0 ? 'Routine' : 'Urgent',
color: entityList.orderType == 0 ? Colors.black : Colors.red[800],
fontWeight: FontWeight.w600,
),
SizedBox(
@ -144,8 +139,7 @@ class ProcedureCard extends StatelessWidget {
),
),
Container(
margin: EdgeInsets.only(
left: 0, top: 25, right: 0, bottom: 0),
margin: EdgeInsets.only(left: 0, top: 25, right: 0, bottom: 0),
padding: EdgeInsets.only(left: 4.0, right: 4.0),
child: Container(
width: 40,
@ -156,9 +150,7 @@ class ProcedureCard extends StatelessWidget {
'assets/images/male_avatar.png',
height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
return Text('No Image');
},
))),
@ -166,8 +158,7 @@ class ProcedureCard extends StatelessWidget {
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.only(
left: 10, top: 25, right: 10, bottom: 0),
margin: EdgeInsets.only(left: 10, top: 25, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -203,7 +194,9 @@ class ProcedureCard extends StatelessWidget {
fontSize: 12,
),
),
if ((entityList.categoryID == 2 || entityList.categoryID == 4) && doctorID == entityList.doctorID && !isInpatient)
if ((entityList.categoryID == 2 || entityList.categoryID == 4) &&
doctorID == entityList.doctorID &&
!isInpatient)
InkWell(
child: Icon(DoctorApp.edit),
onTap: onTap,

@ -158,7 +158,7 @@ class PatientReferralItemWidget extends StatelessWidget {
patientID,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
],
@ -188,7 +188,7 @@ class PatientReferralItemWidget extends StatelessWidget {
: " " + referralClinic,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
@ -215,7 +215,7 @@ class PatientReferralItemWidget extends StatelessWidget {
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('No Image');
return Text('');
},
))
: SizedBox()
@ -239,7 +239,7 @@ class PatientReferralItemWidget extends StatelessWidget {
remark ?? "",
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
maxLines: 1,
),

@ -400,7 +400,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
double.maxFinite,
height == 0
? isInpatient
? (isFromLabResult ? 200 : 190)
? (isFromLabResult ? 210 : 200)
: isAppointmentHeader
? 290
: SizeConfig.isHeightVeryShort

@ -53,14 +53,13 @@ class DoctorCardInsurance extends StatelessWidget {
children: [
Container(
height: 160,
width: 5,
width: 4.5,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
color: approvalStatus == "Approved" ||
approvalStatus == "تمت الموافقة"
color: approvalStatus == "Approved" || approvalStatus == "تمت الموافقة"
? Color(0xff359846)
: Color(0xffD02127),
),
@ -68,8 +67,7 @@ class DoctorCardInsurance extends StatelessWidget {
Expanded(
child: Container(
padding: EdgeInsets.only(
left: projectViewModel.isArabic ? 0 : 15,
right: projectViewModel.isArabic ? 15 : 0),
left: projectViewModel.isArabic ? 0 : 15, right: projectViewModel.isArabic ? 15 : 0),
child: InkWell(
onTap: onTap,
child: Column(
@ -80,8 +78,7 @@ class DoctorCardInsurance extends StatelessWidget {
children: [
AppText(
"$approvalStatus",
color: approvalStatus == "Approved" ||
approvalStatus == "تمت الموافقة"
color: approvalStatus == "Approved" || approvalStatus == "تمت الموافقة"
? Color(0xff359846)
: Color(0xffD02127),
),
@ -92,7 +89,7 @@ class DoctorCardInsurance extends StatelessWidget {
),
color: Color(0xff2E303A)),
child: Padding(
padding: const EdgeInsets.all(5.0),
padding: const EdgeInsets.all(12.0),
child: AppText(
'$patientOut'.replaceAll(" ", ""),
color: Colors.white,
@ -126,90 +123,83 @@ class DoctorCardInsurance extends StatelessWidget {
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (orderNo != null && !isPrescriptions)
Row(
children: <Widget>[
AppText(
'order No:',
color: Colors.grey[500],
),
AppText(
orderNo ?? '',
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[
AppText(
'Invoice:',
color: Colors.grey[500],
),
AppText(
invoiceNO,
)
],
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
if (orderNo != null && !isPrescriptions)
Row(
children: <Widget>[
AppText(
'order No:',
color: Colors.grey[500],
),
if (isPrescriptions)
Row(
children: <Widget>[
AppText(
TranslationBase.of(context).clinic +
": ",
color: Colors.grey[500],
fontSize: 14,
//fontWeight: FontWeight.w600,
//color: Colors.grey[500],
),
Expanded(
child: AppText(
clinic,
//fontWeight: FontWeight.w700,
fontSize: 14.0,
),
)
],
AppText(
orderNo ?? '',
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[
AppText(
'Invoice:',
color: Colors.grey[500],
),
if (branch2 != null)
Row(
children: <Widget>[
AppText(
TranslationBase.of(context).branch +
": ",
fontSize: 14,
color: Colors.grey[500],
),
AppText(
branch2,
fontSize: 14.0,
)
],
AppText(
invoiceNO,
)
],
),
if (isPrescriptions)
Row(
children: <Widget>[
AppText(
TranslationBase.of(context).clinic + ": ",
color: Colors.grey[500],
fontSize: 14,
//fontWeight: FontWeight.w600,
//color: Colors.grey[500],
),
Row(
children: <Widget>[
AppText(
TranslationBase.of(context)
.approvalNo +
": ",
fontSize: 14,
color: Colors.grey[500],
//color: Colors.grey[500],
),
AppText(
branch,
Expanded(
child: AppText(
clinic,
//fontWeight: FontWeight.w700,
fontSize: 14.0,
)
],
),
)
],
),
if (branch2 != null)
Row(
children: <Widget>[
AppText(
TranslationBase.of(context).branch + ": ",
fontSize: 14,
color: Colors.grey[500],
),
AppText(
branch2,
fontSize: 14.0,
)
],
),
Row(
children: <Widget>[
AppText(
TranslationBase.of(context).approvalNo + ": ",
fontSize: 14,
color: Colors.grey[500],
//color: Colors.grey[500],
),
]),
AppText(
branch,
fontSize: 14.0,
)
],
),
]),
),
),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 15.0),
padding: const EdgeInsets.symmetric(horizontal: 15.0),
child: Icon(
EvaIcons.eye,
),

@ -53,7 +53,7 @@ class _RoundedContainerState extends State<RoundedContainer> {
margin: widget.margin,
decoration: widget.showBorder == true
? BoxDecoration(
color: Theme.of(context).primaryColor,
color: Colors.white/*Theme.of(context).primaryColor*/,
border: Border.all(
color: widget.borderColor, width: widget.borderWidth),
borderRadius: widget.customCornerRaduis
@ -64,13 +64,15 @@ class _RoundedContainerState extends State<RoundedContainer> {
bottomLeft: Radius.circular(widget.bottomLeft))
: BorderRadius.circular(widget.raduis),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(widget.shadowWidth),
spreadRadius: widget.shadowSpreadRadius,
blurRadius: 5,
offset: Offset(0, widget.shadowDy), // changes position of shadow
),
])
BoxShadow(
color: Colors.grey.withOpacity(widget.shadowWidth),
spreadRadius: widget.shadowSpreadRadius,
blurRadius: 5,
offset: Offset(
0, widget.shadowDy), // changes position of shadow
),
],
)
: null,
child: Card(
margin: EdgeInsets.all(0),

@ -692,7 +692,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
@ -1026,7 +1026,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
sticky_headers:
dependency: "direct main"
description:
@ -1231,5 +1231,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.2 <2.11.0"
dart: ">=2.10.2 <=2.11.0-213.1.beta"
flutter: ">=1.22.2 <2.0.0"

Loading…
Cancel
Save