Merge branch 'fix_issues' into 'development'

Fix issues

See merge request Cloud_Solution/doctor_app_flutter!275
merge-requests/276/merge
Mohammad Aljammal 5 years ago
commit c948e9b743

@ -215,7 +215,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'Please fill all fields..!',
'ar': 'الرجاء ملأ جميع الحقول..!'
},
'replay2': {'en': 'Replay', 'ar': 'رد الطبيب'},
'replay2': {'en': 'Reply', 'ar': 'رد الطبيب'},
'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'},
'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدليات'},
'price': {'en': 'Price', 'ar': 'السعر'},
@ -674,4 +674,8 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "Referral Remark : ",
'ar': "ملاحظة الإحالة :"
},
'ICDName': {
'en': "ICDName",
'ar': "اسم ال ICD"
},
};

@ -76,7 +76,9 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
if ((_patientSearchFormValues.From == "0" ||
_patientSearchFormValues.To == "0") &&
_selectedType == "7") {
_selectedType == "7" || ((_patientSearchFormValues.From == "0" ||
_patientSearchFormValues.To == "0") &&
_selectedType == "6") ) {
// helpers.showErrorToast("Please Choose The Dates");
} else {
setState(() {

@ -17,6 +17,7 @@ import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
@ -615,9 +616,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
.white,
),
AppText(
item
.age
.toString(),
" ${DateUtils.getAgeByBirthday(item.dateofBirth)}",
fontSize: 1.8 *
SizeConfig
.textMultiplier,

@ -117,6 +117,12 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
marginBottom: 5,
fontWeight: FontWeight.bold,
),
AppText(
notesList[index]
["AdmissionNo"],
marginLeft: 10,
color: Colors.grey[600],
),
AppText(
convertDateFormat(
notesList[index]
@ -128,18 +134,24 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
),
),
children: <Widget>[
Divider(
color: Colors.black,
height: 20,
thickness: 1,
indent: 0,
endIndent: 0,
),
AppText(
notesList[index]["Notes"],
margin: 5,
)
],
Divider(
color: Colors.black,
height: 20,
thickness: 1,
indent: 0,
endIndent: 0,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
notesList[index]["Notes"],
margin: 5,
),
],
)
],
),
],
));

@ -216,5 +216,23 @@ class DateUtils {
return 12;
}
}
static String getAgeByBirthday(dynamic birthday){
// https://leechy.dev/calculate-dates-diff-in-dart
DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday);
final now = DateTime.now();
int years = now.year - birthDate .year;
int months = now.month - birthDate.month;
int days = now.day - birthDate.day;
if (months < 0 || (months == 0 && days < 0)) {
years--;
months += (days < 0 ? 11 : 12);
}
if (days < 0) {
final monthAgo = new DateTime(now.year, now.month - 1, birthDate.day);
days = now.difference(monthAgo).inDays + 1;
}
return "$years Yr $months Mnth $days Day";
}
}

@ -1036,6 +1036,8 @@ class TranslationBase {
String get chiefComplaintErrorMsg =>
localizedValues['chiefComplaintErrorMsg'][locale.languageCode];
String get ICDName =>
localizedValues['ICDName'][locale.languageCode];
String get referralStatus =>
localizedValues['referralStatus'][locale.languageCode];
String get referralRemark =>

@ -18,23 +18,7 @@ import './profile_medical_info_widget.dart';
class PatientProfileWidget extends StatelessWidget {
PatiantInformtion patient;
String getPatientAge(dynamic birthday){
// https://leechy.dev/calculate-dates-diff-in-dart
DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday);
final now = DateTime.now();
int years = now.year - birthDate .year;
int months = now.month - birthDate.month;
int days = now.day - birthDate.day;
if (months < 0 || (months == 0 && days < 0)) {
years--;
months += (days < 0 ? 11 : 12);
}
if (days < 0) {
final monthAgo = new DateTime(now.year, now.month - 1, birthDate.day);
days = now.difference(monthAgo).inDays + 1;
}
return "$years Yr $months Mnth $days Day";
}
@override
Widget build(BuildContext context) {
@ -133,7 +117,7 @@ class PatientProfileWidget extends StatelessWidget {
height: 4,
),
AppText(
"${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${getPatientAge(patient.dateofBirth)/*patient.age*/}",
"${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${DateUtils.getAgeByBirthday(patient.dateofBirth)/*patient.age*/}",
fontWeight: FontWeight.normal,
fontSize: 1.6 * SizeConfig.textMultiplier,
),

@ -210,7 +210,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
assessment.createdOn !=null?DateTime.parse(assessment.createdOn).day.toString():DateTime.now().day.toString(),
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
AppText(
Helpers.getMonth(assessment.createdOn !=null?DateTime.parse(assessment.createdOn).month:DateTime.now().month).toUpperCase(),
@ -225,6 +225,32 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).ICDName +" : ",
fontWeight: FontWeight
.bold,
fontSize: 13,
),
Container(
width: MediaQuery
.of(context)
.size
.width * 0.29,
child: AppText(
assessment
.selectedICD.description
.toString(),
fontSize: 10,
color: Colors.grey,
),
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
@ -233,7 +259,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
TranslationBase.of(context).appointmentNo,
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
AppText(
assessment
@ -248,15 +274,21 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).condition + " : ",
fontWeight: FontWeight
.bold,
fontSize: 13,
),
AppText(
projectViewModel.isArabic?assessment
.selectedDiagnosisCondition
.nameAr : assessment
.selectedDiagnosisCondition
.nameEn,
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 10,
color: Colors.grey,
),
],
),
@ -268,7 +300,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
TranslationBase.of(context).dType+' : ',
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
AppText(
projectViewModel.isArabic?assessment
@ -290,7 +322,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
TranslationBase.of(context).doc,
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
AppText(
assessment.doctorName??'',
@ -309,11 +341,17 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
SizedBox(
height: 6,
),
AppText(
TranslationBase.of(context).remarks + " : ",
fontWeight: FontWeight
.bold,
fontSize: 13,
),
Container(
width: MediaQuery
.of(context)
.size
.width * 0.5,
.width * 0.38,
child: AppText(
assessment.remark ?? "",
fontSize: 10,
@ -335,7 +373,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
"ICD : ".toUpperCase(),
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
Container(
child: AppText(
@ -520,7 +558,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
AppText(
TranslationBase.of(context).addAssessmentDetails.toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
fontSize: 13,
),
SizedBox(
height: 16,

Loading…
Cancel
Save