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

 Conflicts:
	lib/config/localized_values.dart
	lib/util/translations_delegate_base.dart
pull/234/head
Elham Rababah 5 years ago
commit ffe7e7c57f

@ -504,11 +504,29 @@ const Map<String, Map<String, String>> localizedValues = {
'itemExist': {'en': "This item already exist", 'ar': "هذا العنصر موجود"}, 'itemExist': {'en': "This item already exist", 'ar': "هذا العنصر موجود"},
'selectAllergy': {'en': "Select Allergy", 'ar': "أختر الحساسية"}, 'selectAllergy': {'en': "Select Allergy", 'ar': "أختر الحساسية"},
'selectSeverity': {'en': "Select Severity", 'ar': "أختر الدرجه"}, 'selectSeverity': {'en': "Select Severity", 'ar': "أختر الدرجه"},
'medications': {'en': "Medications", 'ar':"الأدوية" }, 'leaveCreated': {'en': "Leave has been created", 'ar': "تم إنشاء الإجازة"},
'procedures': {'en': "Procedures", 'ar':"الإجراءات" }, 'medications': {'en': "Medications", 'ar': "الأدوية"},
'vitalSignEmptyMsg': {'en': "There is no vital signs for this patient", 'ar':"لا توجد علامات حيوية لهذا المريض" }, 'procedures': {'en': "Procedures", 'ar': "الإجراءات"},
'referralEmptyMsg': {'en': "There is no referral data", 'ar':"لا توجد بيانات إحالة" }, 'vitalSignEmptyMsg': {
'referralSuccessMsg': {'en': "You make referral successfully", 'ar':"You make referral successfully" }, 'en': "There is no vital signs for this patient",
'ar': "لا توجد علامات حيوية لهذا المريض"
},
'referralEmptyMsg': {
'en': "There is no referral data",
'ar': "لا توجد بيانات إحالة"
},
'referralSuccessMsg': {
'en': "You make referral successfully",
'ar': "You make referral successfully"
},
'diagnoseType': {'en': "Diagnose Type", 'ar':"نوع التشخيص" },
'condition': {'en': "Condition", 'ar':"الحالة" },
'id': {'en': "ID", 'ar':"بطاقة هوية" },
'quantity': {'en': "Quantity", 'ar':"الكمية" },
'codeNo': {'en': "Code #", 'ar':"# الرمز" },
'covered': {'en': "Covered", 'ar':"مغطى" },
'approvalRequired': {'en': "Approval Required", 'ar':"الموافقة مطلوبة" },
'uncoveredByDoctor': {'en': "Uncovered By Doctor", 'ar':"غير مغطى من قبل الدكتور" },
'addAssessment': {'en': "Add ASSESSMENT", 'ar':"أضف التقييم" }, 'addAssessment': {'en': "Add ASSESSMENT", 'ar':"أضف التقييم" },
'assessment': {'en': "ASSESSMENT", 'ar':" التقييم" }, 'assessment': {'en': "ASSESSMENT", 'ar':" التقييم" },
}; };

File diff suppressed because it is too large Load Diff

@ -9,12 +9,13 @@ class MedicalFileService extends BaseService {
List<MedicalFileModel> get medicalFileList => _medicalFileList; List<MedicalFileModel> get medicalFileList => _medicalFileList;
MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel( MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel(
patientMRN: 1231755, //patientMRN: 1231755,
vidaAuthTokenID: vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU",
); );
Future getMedicalFile() async { Future getMedicalFile({int mrn}) async {
_fileRequestModel = MedicalFileRequestModel(patientMRN: mrn);
hasError = false; hasError = false;
_medicalFileList.clear(); _medicalFileList.clear();
await baseAppClient.post(GET_MEDICAL_FILE, await baseAppClient.post(GET_MEDICAL_FILE,

@ -59,7 +59,7 @@ class VitalSignsService extends BaseService{
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
if(response['VitalSignsList'] != null){ if(response['VitalSignsList'] != null){
if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){ if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){
patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList']['0']); patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList'][0]);
} }
} }
}, },

@ -12,11 +12,11 @@ class MedicalFileViewModel extends BaseViewModel {
List<MedicalFileModel> get medicalFileList => List<MedicalFileModel> get medicalFileList =>
_medicalFileService.medicalFileList; _medicalFileService.medicalFileList;
Future getMedicalFile() async { Future getMedicalFile({int mrn}) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _medicalFileService.getMedicalFile(); await _medicalFileService.getMedicalFile(mrn: mrn);
if (_medicalFileService.hasError) { if (_medicalFileService.hasError) {
error = _medicalFileService.error; error = _medicalFileService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -95,7 +95,7 @@ class VitalSignsViewModel extends BaseViewModel {
); );
} }
String getBMI(double bodyMassIndex) { String getBMI(var bodyMassIndex) {
if (bodyMassIndex <= 18.5) { if (bodyMassIndex <= 18.5) {
return "Underweight"; return "Underweight";
} else if (bodyMassIndex <= 25.0) { } else if (bodyMassIndex <= 25.0) {

@ -5,7 +5,7 @@ class VitalSignData {
int bloodPressureHigher; int bloodPressureHigher;
int bloodPressureLower; int bloodPressureLower;
int bloodPressurePatientPosition; int bloodPressurePatientPosition;
double bodyMassIndex; var bodyMassIndex;
int fio2; int fio2;
int headCircumCm; int headCircumCm;
int heightCm; int heightCm;

File diff suppressed because it is too large Load Diff

@ -22,7 +22,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
return BaseView<MedicalFileViewModel>( return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(), onModelReady: (model) => model.getMedicalFile(mrn: patient.patientMRN),
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
@ -30,140 +30,147 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appBarTitle: 'medical Report'.toUpperCase(), appBarTitle: 'medical Report'.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: Container( child: SingleChildScrollView(
child: Column( child: Container(
children: [ child: Column(
Padding( children: [
padding: EdgeInsets.all(8.0), Padding(
child: Row( padding: EdgeInsets.all(8.0),
children: <Widget>[ child: Row(
AvatarWidget( children: <Widget>[
Icon( AvatarWidget(
patient.genderDescription == "Male" Icon(
? DoctorApp.male patient.genderDescription == "Male"
: DoctorApp.female_icon, ? DoctorApp.male
size: 70, : DoctorApp.female_icon,
color: Colors.white, size: 70,
), color: Colors.white,
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
children: [
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 5.0,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
), ),
], ),
) SizedBox(
], width: 20,
), ),
), Column(
Divider( crossAxisAlignment: CrossAxisAlignment.start,
height: 1.0, children: [
thickness: 1.0, AppText(
color: Colors.grey, patient.firstName + ' ' + patient.lastName,
), color: Colors.black,
ListView.builder( fontWeight: FontWeight.bold,
scrollDirection: Axis.vertical, ),
shrinkWrap: true, Row(
itemCount: 2,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
children: [ children: [
Row( AppText(
children: [ TranslationBase.of(context).fileNo,
AppText( color: Colors.black,
'Branch : ', fontWeight: FontWeight.bold,
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.admissions[index].projectName,
),
],
), ),
Row( SizedBox(
children: [ width: 5.0,
AppText( ),
'Doctor : '.toUpperCase(), AppText(
fontWeight: FontWeight.w700, patient.age.toString(),
), color: Colors.black,
AppText( fontWeight: FontWeight.normal,
model.medicalFileList[0].entityList[0]
.admissions[index].doctor
.toUpperCase(),
fontWeight: FontWeight.w700,
),
],
), ),
Row( ],
),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
),
],
)
],
),
),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
if (model.medicalFileList.length != 0)
ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0].entityList[0].timelines.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
children: [ children: [
AppText( Row(
'Clinic : ', children: [
fontWeight: FontWeight.w700, AppText(
'Branch : ',
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName),
],
), ),
AppText( Row(
model.medicalFileList[0].entityList[0] children: [
.admissions[index].clinic, AppText(
'Doctor : '.toUpperCase(),
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.timelines[index].doctorName,
fontWeight: FontWeight.w700,
),
],
), ),
Row(
children: [
AppText(
'Clinic : ',
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.timelines[index].clinicName,
),
],
),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
], ],
), ),
SizedBox(height: 10.0), ),
Divider( onTap: () {
height: 1.0, Navigator.push(
thickness: 1.0, context,
color: Colors.grey.shade400, MaterialPageRoute(
) builder: (context) => MedicalFileDetails(
], age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientMRN,
)),
);
},
), ),
), );
onTap: () { })
Navigator.push( ],
context, ),
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
)),
);
},
),
);
})
],
), ),
), ),
), ),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.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/base/base_view.dart';
@ -5,6 +6,7 @@ import 'package:doctor_app_flutter/util/helpers.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/profile/PatientHeaderWidgetNoAvatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -14,7 +16,6 @@ class UcafDetailScreen extends StatefulWidget {
} }
class _UcafDetailScreenState extends State<UcafDetailScreen> { class _UcafDetailScreenState extends State<UcafDetailScreen> {
int _activeTap = 0; int _activeTap = 0;
@override @override
@ -45,7 +46,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
SizedBox( SizedBox(
height: 16, height: 16,
), ),
getSelectedTreatmentStepItem(context), ...getSelectedTreatmentStepItem(context),
], ],
), ),
), ),
@ -64,8 +65,8 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
]; ];
return Container( return Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
decoration: decoration: Helpers.containerBorderDecoration(
Helpers.containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)), Color(0Xffffffff), Color(0xFFCCCCCC)),
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -105,8 +106,296 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
); );
} }
Widget getSelectedTreatmentStepItem(BuildContext _context) { List<Widget> getSelectedTreatmentStepItem(BuildContext _context) {
return Container(); switch (_activeTap) {
case 0:
return [...List.generate(2, (index) => DiagnosisWidget()).toList()];
case 1:
return [...List.generate(2, (index) => MedicationWidget()).toList()];
case 2:
return [...List.generate(2, (index) => ProceduresWidget()).toList()];
default:
return [
Container(),
];
}
}
}
class DiagnosisWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).diagnoseType}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"Preliminary Diagnosis",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: AppText(
"B34.2 | CORONA VIRUS INFECTION, UNSPECIFIED SITE",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
AppText(
"${TranslationBase.of(context).condition}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"174.00 Same",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 1,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
],
);
}
}
class MedicationWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).id}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"6",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
SizedBox(
width: 16,
),
AppText(
"${TranslationBase.of(context).price}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"35.6",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
SizedBox(
width: 16,
),
AppText(
"${TranslationBase.of(context).quantity}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"3",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: AppText(
"EVE SKIN CREAM WITH HONEY -170GM",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: AppText(
"Every other day for 5 days",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
),
],
),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 1,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
],
);
} }
}
class ProceduresWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).codeNo}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"019054846",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
AppText(
"${TranslationBase.of(context).quantity}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"1",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Expanded(
child: AppText(
"SCAN - RENAL MASS PROTOCOL",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
AppText(
"${TranslationBase.of(context).covered}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"Yes",
fontWeight: FontWeight.normal,
color: Colors.green,
fontSize: SizeConfig.textMultiplier * 2.0,
),
SizedBox(
width: 16,
),
AppText(
"${TranslationBase.of(context).approvalRequired}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"Yes",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
AppText(
"${TranslationBase.of(context).uncoveredByDoctor}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"Yes",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 1,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
],
);
}
} }

@ -415,43 +415,57 @@ class _TemperatureWidgetState extends State<TemperatureWidget> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).temperature} (C):", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).temperature} (C):",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.temperatureCelcius}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.temperatureCelcius}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).temperature} (F):", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).temperature} (F):",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.temperatureCelcius * (9 / 5) + 32}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.temperatureCelcius * (9 / 5) + 32}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
], ],
), ),
@ -534,44 +548,59 @@ class _PulseWidgetState extends State<PulseWidget> {
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).pulseBeats}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).pulseBeats}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.pulseBeatPerMinute}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.pulseBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).rhythm}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).rhythm}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.pulseRhythm}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.pulseRhythm}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
], ],
), ),
@ -628,43 +657,57 @@ class _RespirationWidgetState extends State<RespirationWidget> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).respBeats}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).respBeats}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.respirationBeatPerMinute}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.respirationBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).patternOfRespiration}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).patternOfRespiration}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.respirationPattern}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.respirationPattern}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
], ],
), ),
@ -721,43 +764,57 @@ class _BloodPressureWidgetState extends State<BloodPressureWidget> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).bloodPressureDiastoleAndSystole}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).bloodPressureDiastoleAndSystole}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).cuffLocation}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).cuffLocation}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.bloodPressureCuffLocation}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.bloodPressureCuffLocation}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
], ],
), ),
@ -766,44 +823,54 @@ class _BloodPressureWidgetState extends State<BloodPressureWidget> {
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( crossAxisAlignment: CrossAxisAlignment.start,
"${TranslationBase.of(context).patientPosition}", children: [
fontSize: SizeConfig.textMultiplier * 1.8, Expanded(
color: Colors.black, child: AppText(
fontWeight: FontWeight.w700, "${TranslationBase.of(context).patientPosition}",
), fontSize: SizeConfig.textMultiplier * 1.8,
SizedBox( color: Colors.black,
width: 8, fontWeight: FontWeight.w700,
), ),
AppText( ),
"${widget.vitalSign.bloodPressurePatientPosition}", SizedBox(
fontSize: SizeConfig.textMultiplier * 2, width: 8,
color: Colors.grey.shade800, ),
fontWeight: FontWeight.normal, Expanded(
), child: AppText(
], "${widget.vitalSign.bloodPressurePatientPosition}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( children: [
"${TranslationBase.of(context).cuffSize}", AppText(
fontSize: SizeConfig.textMultiplier * 1.8, "${TranslationBase.of(context).cuffSize}",
color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, color: Colors.black,
), fontWeight: FontWeight.w700,
SizedBox( ),
width: 8, SizedBox(
), width: 8,
AppText( ),
"${widget.vitalSign.bloodPressureCuffSize}", AppText(
fontSize: SizeConfig.textMultiplier * 2, "${widget.vitalSign.bloodPressureCuffSize}",
color: Colors.grey.shade800, fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.normal, color: Colors.grey.shade800,
), fontWeight: FontWeight.normal,
], ),
],
),
), ),
], ],
), ),
@ -953,43 +1020,47 @@ class _PainScaleWidgetState extends State<PainScaleWidget> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
children: [ child: Row(
AppText( children: [
"${TranslationBase.of(context).painScale}", AppText(
fontSize: SizeConfig.textMultiplier * 1.8, "${TranslationBase.of(context).painScale}",
color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, color: Colors.black,
), fontWeight: FontWeight.w700,
SizedBox( ),
width: 8, SizedBox(
), width: 8,
AppText( ),
"${widget.vitalSign.painScore}", AppText(
fontSize: SizeConfig.textMultiplier * 2, "${widget.vitalSign.painScore}",
color: Colors.grey.shade800, fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.normal, color: Colors.grey.shade800,
), fontWeight: FontWeight.normal,
], ),
],
),
), ),
Row( Expanded(
children: [ child: Row(
AppText( children: [
"${TranslationBase.of(context).painManagement}", AppText(
fontSize: SizeConfig.textMultiplier * 1.8, "${TranslationBase.of(context).painManagement}",
color: Colors.black, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, color: Colors.black,
), fontWeight: FontWeight.w700,
SizedBox( ),
width: 8, SizedBox(
), width: 8,
AppText( ),
"${widget.vitalSign.isPainManagementDone}", AppText(
fontSize: SizeConfig.textMultiplier * 2, "${widget.vitalSign.isPainManagementDone}",
color: Colors.grey.shade800, fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.normal, color: Colors.grey.shade800,
), fontWeight: FontWeight.normal,
], ),
],
),
), ),
], ],
), ),

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart
import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/dynamic_elements.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.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_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
@ -17,14 +18,51 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
void addPrescriptionForm(context, PrescriptionViewModel model) { class AddPrescriptionFormScreen extends StatefulWidget {
@override
_AddPrescriptionFormScreenState createState() =>
_AddPrescriptionFormScreenState();
}
class _AddPrescriptionFormScreenState extends State<AddPrescriptionFormScreen> {
PrescriptionViewModel model = PrescriptionViewModel();
// PostPrescriptionReqModel addPrescriptionModel = PostPrescriptionReqModel();
// List<PrescriptionRequestModel> sss = List();
// void _presentDatePicker(id) {
// showDatePicker(
// context: context,
// initialDate: DateTime.now(),
// firstDate: DateTime(2019),
// lastDate: DateTime(2050),
// ).then((pickedDate) {
// if (pickedDate == null) {
// return;
// }
// setState(() {
// // var selectedDate = DateFormat.yMd().format(pickedDate);
// final df = new DateFormat('yyyy-MM-dd');
// model.startDate = df.format(pickedDate);
//
// strengthController.text = sss.add(PrescriptionRequestModel(doseStartDate: ''));
// //addSickLeave.startDate = selectedDate;
// });
// });
// }
@override
Widget build(BuildContext context) {
return addPrescriptionForm(context, model);
}
}
addPrescriptionForm(context, PrescriptionViewModel model) {
TextEditingController durationController = TextEditingController(); TextEditingController durationController = TextEditingController();
TextEditingController strengthController = TextEditingController(); TextEditingController strengthController = TextEditingController();
TextEditingController routeController = TextEditingController(); TextEditingController routeController = TextEditingController();
TextEditingController frequencyController = TextEditingController(); TextEditingController frequencyController = TextEditingController();
TextEditingController indicationController = TextEditingController(); TextEditingController indicationController = TextEditingController();
TextEditingController instructions = TextEditingController(); TextEditingController instructionController = TextEditingController();
TextEditingController drugIdController = TextEditingController(); TextEditingController drugIdController = TextEditingController();
TextEditingController doseController = TextEditingController(); TextEditingController doseController = TextEditingController();
@ -267,10 +305,12 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
child: TextFields( child: TextFields(
maxLines: 6,
minLines: 4,
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context)
.instruction, .instruction,
controller: indicationController, controller: instructionController,
keyboardType: TextInputType.number, //keyboardType: TextInputType.number,
validator: (value) { validator: (value) {
if (value.isEmpty) if (value.isEmpty)
return TranslationBase.of(context) return TranslationBase.of(context)

@ -45,23 +45,49 @@ class AddRescheduleLeavScreen extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppTextFormField( InkWell(
hintText: child: Row(
TranslationBase.of(context).requestLeave, children: [
borderColor: Colors.white, Expanded(
prefix: IconButton( flex: 4,
icon: Icon( child: AppText(
Icons.add_circle, TranslationBase.of(context)
color: Colors.red, .requestLeave),
)), ),
textInputType: TextInputType.text, IconButton(
icon: Icon(
Icons.add_circle,
color: Colors.red,
))
],
)
// AppTextFormField(
// hintText:
// TranslationBase.of(context).requestLeave,
// borderColor: Colors.white,
// prefix: IconButton(
// icon: Icon(
// Icons.add_circle,
// color: Colors.red,
// )),
// // textInputType: TextInputType.text,
// readOnly: true,
// onTap: () {
// openLeave(
// context,
// false,
// );
// return false;
// },
// inputFormatter: ONLY_LETTERS,
// )
,
onTap: () { onTap: () {
openLeave( openLeave(
context, context,
false, false,
); );
}, },
inputFormatter: ONLY_LETTERS,
) )
], ],
), ),
@ -158,7 +184,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
AppText(getDoctor( AppText(getDoctor(
model model
.coveringDoctors, .coveringDoctors,
item.doctorId)) item.coveringDoctorId))
]) ])
: SizedBox(), : SizedBox(),
AppText( AppText(
@ -272,7 +298,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
getDoctor(model, doctorId) { getDoctor(model, doctorId) {
var obj; var obj;
obj = model.where((i) => i['doctorID'] == doctorId).toList(); obj = model.where((i) => i['doctorID'].toString() == doctorId).toList();
print(obj); print(obj);
return obj.length > 0 ? obj[0]['doctorName'] : ""; return obj.length > 0 ? obj[0]['doctorName'] : "";

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.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/helpers.dart';
import 'package:doctor_app_flutter/util/text_validator.dart'; import 'package:doctor_app_flutter/util/text_validator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -50,10 +51,11 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
var clinicID; var clinicID;
TextEditingController _controller4; TextEditingController _controller4;
void _presentDatePicker(id) { void _presentDatePicker(id) {
var date = new DateTime.now();
showDatePicker( showDatePicker(
context: context, context: context,
initialDate: DateTime.now(), initialDate: new DateTime(date.year, date.month, date.day + 15),
firstDate: DateTime.now(), firstDate: new DateTime(date.year, date.month, date.day + 15),
lastDate: DateTime(2050), lastDate: DateTime(2050),
).then((pickedDate) { ).then((pickedDate) {
if (pickedDate == null) { if (pickedDate == null) {
@ -130,10 +132,12 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
child: DropdownButton( child: DropdownButton(
focusColor: Colors.grey, focusColor: Colors.grey,
isExpanded: true, isExpanded: true,
dropdownColor:
Colors.grey,
value: getClinicName( value: getClinicName(
model) ?? model) ??
"", "",
iconSize: 40, iconSize: 0,
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder:
(BuildContext (BuildContext
@ -151,8 +155,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color: color: Colors
Colors.grey, .grey[500],
), ),
], ],
); );
@ -234,7 +238,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
child: child:
DropdownButtonHideUnderline( DropdownButtonHideUnderline(
child: DropdownButton( child: DropdownButton(
focusColor: Colors.grey, // focusColor: Colors.grey,
isExpanded: true, isExpanded: true,
value: offTime == null value: offTime == null
? model2.allOffTime[0] ? model2.allOffTime[0]
@ -256,8 +260,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color: // color:
Colors.grey, // Colors.grey,
), ),
], ],
); );
@ -560,8 +564,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color: // color:
Colors.grey, // Colors.grey,
), ),
], ],
); );
@ -654,8 +658,6 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color:
Colors.grey,
), ),
], ],
); );
@ -731,9 +733,10 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
getProfile() async { getProfile() async {
Map p = await sharedPref.getObj(DOCTOR_PROFILE); Map p = await sharedPref.getObj(DOCTOR_PROFILE);
setState(() { setState(() {
this.profile = p;
if (widget.updateData != null) { if (widget.updateData != null) {
this.profile = p;
this.clinicID = widget.updateData.clinicId; this.clinicID = widget.updateData.clinicId;
_toDateController.text = widget.updateData.dateTimeFrom; _toDateController.text = widget.updateData.dateTimeFrom;
@ -756,7 +759,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"requisitionNo": 0, "requisitionNo": 0,
"requisitionType": offTime, "requisitionType": offTime,
"clinicId": this.profile['ClinicID'], "clinicId": this.profile['ClinicID'],
"doctorId": this.profile['ClinicID'], "doctorId": this.profile['DoctorID'],
"dateTimeFrom": df.format(fromDate), "dateTimeFrom": df.format(fromDate),
"dateTimeTo": df.format(toDate), "dateTimeTo": df.format(toDate),
"date": df.format(DateTime.now()), "date": df.format(DateTime.now()),
@ -779,7 +782,9 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
}; };
model.addReschedule(request).then((response) { model.addReschedule(request).then((response) {
print(response); DrAppToastMsg.showSuccesToast(TranslationBase.of(context).leaveCreated);
Navigator.pop(context);
model.getRescheduleLeave();
}); });
} }
@ -790,7 +795,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"requisitionNo": 0, "requisitionNo": 0,
"requisitionType": offTime, "requisitionType": offTime,
"clinicId": this.profile['ClinicID'], "clinicId": this.profile['ClinicID'],
"doctorId": this.profile['ClinicID'], "doctorId": this.profile['DoctorID'],
"dateTimeFrom": df.format(fromDate), "dateTimeFrom": df.format(fromDate),
"dateTimeTo": df.format(toDate), "dateTimeTo": df.format(toDate),
"date": df.format(DateTime.now()), "date": df.format(DateTime.now()),

@ -203,7 +203,7 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
value: getClinicName( value: getClinicName(
model) ?? model) ??
"", "",
iconSize: 40, iconSize: 0,
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder:
(BuildContext (BuildContext
@ -221,6 +221,8 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2.1, 2.1,
color:
Colors.grey,
), ),
], ],
); );
@ -310,18 +312,19 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
// TranslationBase.of(context).remarks, // TranslationBase.of(context).remarks,
// fontSize: 10, // fontSize: 10,
// ), // ),
AppTextFormField( TextField(
borderColor: Colors.white, maxLines: 3,
hintText: widget.extendedData != null decoration: InputDecoration(
? widget.extendedData.remarks contentPadding: EdgeInsets.all(20.0),
: TranslationBase.of(context).remarks, border: InputBorder.none,
onChanged: (value) { hintText: widget.extendedData != null
addSickLeave.remarks = value; ? widget.extendedData.remarks
}, : TranslationBase.of(context)
validator: (value) { .remarks),
// return TextValidator().validateName(value); onChanged: (value) {
}, addSickLeave.remarks = value;
inputFormatter: ONLY_LETTERS) },
)
], ],
), ),
), ),

@ -532,6 +532,22 @@ class TranslationBase {
localizedValues['selectAllergy'][locale.languageCode]; localizedValues['selectAllergy'][locale.languageCode];
String get selectSeverity => String get selectSeverity =>
localizedValues['selectSeverity'][locale.languageCode]; localizedValues['selectSeverity'][locale.languageCode];
String get leaveCreated =>
localizedValues['leaveCreated'][locale.languageCode];
String get vitalSignEmptyMsg =>
localizedValues['vitalSignEmptyMsg'][locale.languageCode];
String get referralEmptyMsg =>
localizedValues['referralEmptyMsg'][locale.languageCode];
String get referralSuccessMsg =>
localizedValues['referralSuccessMsg'][locale.languageCode];
String get diagnoseType => localizedValues['diagnoseType'][locale.languageCode];
String get condition => localizedValues['condition'][locale.languageCode];
String get id => localizedValues['id'][locale.languageCode];
String get quantity => localizedValues['quantity'][locale.languageCode];
String get codeNo => localizedValues['codeNo'][locale.languageCode];
String get covered => localizedValues['covered'][locale.languageCode];
String get approvalRequired => localizedValues['approvalRequired'][locale.languageCode];
String get uncoveredByDoctor => localizedValues['uncoveredByDoctor'][locale.languageCode];
String get vitalSignEmptyMsg => localizedValues['vitalSignEmptyMsg'][locale.languageCode]; String get vitalSignEmptyMsg => localizedValues['vitalSignEmptyMsg'][locale.languageCode];
String get referralEmptyMsg => localizedValues['referralEmptyMsg'][locale.languageCode]; String get referralEmptyMsg => localizedValues['referralEmptyMsg'][locale.languageCode];
String get referralSuccessMsg => localizedValues['referralSuccessMsg'][locale.languageCode]; String get referralSuccessMsg => localizedValues['referralSuccessMsg'][locale.languageCode];

@ -461,7 +461,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.2" version: "0.6.3-nullsafety.1"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:
@ -503,7 +503,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -760,7 +760,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -895,5 +895,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save