Merge branch 'design-fixes' into 'development'

design fixes

See merge request Cloud_Solution/doctor_app_flutter!846
merge-requests/847/merge
Mohammad Aljammal 3 years ago
commit dd4eb2f76d

@ -10,6 +10,8 @@ class LabResult {
String projectID; String projectID;
String referanceRange; String referanceRange;
String resultValue; String resultValue;
String maxValue;
String minValue;
String sampleCollectedOn; String sampleCollectedOn;
String sampleReceivedOn; String sampleReceivedOn;
String setupID; String setupID;
@ -21,24 +23,26 @@ class LabResult {
LabResult( LabResult(
{this.description, {this.description,
this.femaleInterpretativeData, this.femaleInterpretativeData,
this.gender, this.gender,
this.lineItemNo, this.lineItemNo,
this.maleInterpretativeData, this.maleInterpretativeData,
this.notes, this.notes,
this.packageID, this.packageID,
this.patientID, this.patientID,
this.projectID, this.projectID,
this.referanceRange, this.referanceRange,
this.resultValue, this.resultValue,
this.sampleCollectedOn, this.maxValue,
this.sampleReceivedOn, this.minValue,
this.setupID, this.sampleCollectedOn,
this.superVerifiedOn, this.sampleReceivedOn,
this.testCode, this.setupID,
this.uOM, this.superVerifiedOn,
this.verifiedOn, this.testCode,
this.verifiedOnDateTime}); this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
LabResult.fromJson(Map<String, dynamic> json) { LabResult.fromJson(Map<String, dynamic> json) {
description = json['Description']; description = json['Description'];
@ -52,6 +56,8 @@ class LabResult {
projectID = json['ProjectID'].toString(); projectID = json['ProjectID'].toString();
referanceRange = json['ReferenceRange'] ?? json['ReferanceRange']; referanceRange = json['ReferenceRange'] ?? json['ReferanceRange'];
resultValue = json['ResultValue']; resultValue = json['ResultValue'];
maxValue = json['MaxValue'];
minValue = json['MinValue'];
sampleCollectedOn = json['SampleCollectedOn']; sampleCollectedOn = json['SampleCollectedOn'];
sampleReceivedOn = json['SampleReceivedOn']; sampleReceivedOn = json['SampleReceivedOn'];
setupID = json['SetupID']; setupID = json['SetupID'];
@ -75,6 +81,8 @@ class LabResult {
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['ReferanceRange'] = this.referanceRange; data['ReferanceRange'] = this.referanceRange;
data['ResultValue'] = this.resultValue; data['ResultValue'] = this.resultValue;
data['MaxValue'] = this.maxValue;
data['MinValue'] = this.minValue;
data['SampleCollectedOn'] = this.sampleCollectedOn; data['SampleCollectedOn'] = this.sampleCollectedOn;
data['SampleReceivedOn'] = this.sampleReceivedOn; data['SampleReceivedOn'] = this.sampleReceivedOn;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
@ -85,8 +93,29 @@ class LabResult {
data['VerifiedOnDateTime'] = this.verifiedOnDateTime; data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
return data; 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 { class LabResultList {
String filterName = ""; 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'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
class UcafService extends LookupService { class UcafService extends LookupService {
List<GetChiefComplaintResModel> patientChiefComplaintList = []; List<GetChiefComplaintResModel> patientChiefComplaintList;
List<VitalSignHistory> patientVitalSignsHistory = []; List<VitalSignHistory> patientVitalSignsHistory;
List<GetAssessmentResModel> patientAssessmentList = []; List<GetAssessmentResModel> patientAssessmentList = [];
List<OrderProcedure> orderProcedureList = []; List<OrderProcedure> orderProcedureList = [];
PrescriptionModel prescriptionList; PrescriptionModel prescriptionList;
@ -17,15 +17,20 @@ class UcafService extends LookupService {
Future getPatientChiefComplaint(PatiantInformtion patient) async { Future getPatientChiefComplaint(PatiantInformtion patient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN ; body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo; body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo ; body['EpisodeID'] = patient.episodeNo;
body['DoctorID'] = ""; body['DoctorID'] = "";
patientChiefComplaintList = null;
await baseAppClient.post(GET_CHIEF_COMPLAINT, await baseAppClient.post(GET_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientChiefComplaintList.clear(); if (patientChiefComplaintList != null) {
patientChiefComplaintList.clear();
} else {
patientChiefComplaintList = new List();
}
response['List_ChiefComplaint']['entityList'].forEach((v) { response['List_ChiefComplaint']['entityList'].forEach((v) {
patientChiefComplaintList.add(GetChiefComplaintResModel.fromJson(v)); patientChiefComplaintList.add(GetChiefComplaintResModel.fromJson(v));
}); });
@ -47,10 +52,15 @@ class UcafService extends LookupService {
body['InOutPatientType'] = 2; body['InOutPatientType'] = 2;
} }
patientVitalSignsHistory = null;
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_VITAL_SIGN, GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear(); if (patientVitalSignsHistory != null) {
patientVitalSignsHistory.clear();
} else {
patientVitalSignsHistory = new List();
}
if (response['List_DoctorPatientVitalSign'] != null) { if (response['List_DoctorPatientVitalSign'] != null) {
response['List_DoctorPatientVitalSign'].forEach((v) { response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));
@ -79,10 +89,15 @@ class UcafService extends LookupService {
body['From'] = fromDate; body['From'] = fromDate;
body['To'] = toDate; body['To'] = toDate;
patientVitalSignsHistory = null;
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_VITAL_SIGN_DATA, GET_PATIENT_VITAL_SIGN_DATA,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientVitalSignsHistory.clear(); if (patientVitalSignsHistory != null) {
patientVitalSignsHistory.clear();
} else {
patientVitalSignsHistory = new List();
}
if (response['VitalSignsHistory'] != null) { if (response['VitalSignsHistory'] != null) {
response['VitalSignsHistory'].forEach((v) { response['VitalSignsHistory'].forEach((v) {
patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v));

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

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

@ -71,7 +71,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
body: model.patientVitalSignsHistory.length > 0 && body: model.patientVitalSignsHistory != null &&
model.patientVitalSignsHistory.length > 0 &&
model.patientChiefComplaintList != null && model.patientChiefComplaintList != null &&
model.patientChiefComplaintList.length > 0 model.patientChiefComplaintList.length > 0
? Column( ? Column(
@ -380,30 +381,33 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
), ),
], ],
) )
: Center( : model.patientChiefComplaintList != null ||
child: Column( model.patientVitalSignsHistory != null
crossAxisAlignment: CrossAxisAlignment.center, ? Center(
children: [ child: Column(
SizedBox( crossAxisAlignment: CrossAxisAlignment.center,
height: 100, 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( : Container(),
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,
),
)
],
),
),
), ),
); );
} }

@ -163,6 +163,7 @@ class LabResultWidget extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if(patientLabResultList[index].checkResultStatus() != 0)
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
@ -172,7 +173,7 @@ class LabResultWidget extends StatelessWidget {
// ), // ),
), ),
child: Icon( child: Icon(
Icons.arrow_upward, patientLabResultList[index].checkResultStatus() == 1 ? Icons.arrow_upward : Icons.arrow_downward,
color: Colors.white, color: Colors.white,
size: 16, size: 16,
), ),

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

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

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

Loading…
Cancel
Save