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': "هذا العنصر موجود"},
'selectAllergy': {'en': "Select Allergy", 'ar': "أختر الحساسية"},
'selectSeverity': {'en': "Select Severity", 'ar': "أختر الدرجه"},
'medications': {'en': "Medications", 'ar':"الأدوية" },
'procedures': {'en': "Procedures", 'ar':"الإجراءات" },
'vitalSignEmptyMsg': {'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" },
'leaveCreated': {'en': "Leave has been created", 'ar': "تم إنشاء الإجازة"},
'medications': {'en': "Medications", 'ar': "الأدوية"},
'procedures': {'en': "Procedures", 'ar': "الإجراءات"},
'vitalSignEmptyMsg': {
'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':"أضف التقييم" },
'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;
MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel(
patientMRN: 1231755,
//patientMRN: 1231755,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU",
);
Future getMedicalFile() async {
Future getMedicalFile({int mrn}) async {
_fileRequestModel = MedicalFileRequestModel(patientMRN: mrn);
hasError = false;
_medicalFileList.clear();
await baseAppClient.post(GET_MEDICAL_FILE,

@ -59,7 +59,7 @@ class VitalSignsService extends BaseService{
onSuccess: (dynamic response, int statusCode) {
if(response['VitalSignsList'] != null){
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 =>
_medicalFileService.medicalFileList;
Future getMedicalFile() async {
Future getMedicalFile({int mrn}) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _medicalFileService.getMedicalFile();
await _medicalFileService.getMedicalFile(mrn: mrn);
if (_medicalFileService.hasError) {
error = _medicalFileService.error;
setState(ViewState.ErrorLocal);

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

@ -5,7 +5,7 @@ class VitalSignData {
int bloodPressureHigher;
int bloodPressureLower;
int bloodPressurePatientPosition;
double bodyMassIndex;
var bodyMassIndex;
int fio2;
int headCircumCm;
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;
patient = routeArgs['patient'];
return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(),
onModelReady: (model) => model.getMedicalFile(mrn: patient.patientMRN),
builder:
(BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold(
@ -30,140 +30,147 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appBarTitle: 'medical Report'.toUpperCase(),
body: NetworkBaseView(
baseViewModel: model,
child: Container(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
AvatarWidget(
Icon(
patient.genderDescription == "Male"
? DoctorApp.male
: DoctorApp.female_icon,
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,
child: SingleChildScrollView(
child: Container(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
AvatarWidget(
Icon(
patient.genderDescription == "Male"
? DoctorApp.male
: DoctorApp.female_icon,
size: 70,
color: Colors.white,
),
],
)
],
),
),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: 2,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
children: [
Row(
children: [
AppText(
'Branch : ',
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.admissions[index].projectName,
),
],
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
children: [
AppText(
'Doctor : '.toUpperCase(),
fontWeight: FontWeight.w700,
),
AppText(
model.medicalFileList[0].entityList[0]
.admissions[index].doctor
.toUpperCase(),
fontWeight: FontWeight.w700,
),
],
SizedBox(
width: 5.0,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
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: [
AppText(
'Clinic : ',
fontWeight: FontWeight.w700,
Row(
children: [
AppText(
'Branch : ',
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName),
],
),
AppText(
model.medicalFileList[0].entityList[0]
.admissions[index].clinic,
Row(
children: [
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(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
],
),
onTap: () {
Navigator.push(
context,
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/models/patient/patiant_info_model.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/widgets/patients/profile/PatientHeaderWidgetNoAvatar.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:hexcolor/hexcolor.dart';
@ -14,7 +16,6 @@ class UcafDetailScreen extends StatefulWidget {
}
class _UcafDetailScreenState extends State<UcafDetailScreen> {
int _activeTap = 0;
@override
@ -45,7 +46,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
SizedBox(
height: 16,
),
getSelectedTreatmentStepItem(context),
...getSelectedTreatmentStepItem(context),
],
),
),
@ -64,8 +65,8 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
];
return Container(
height: screenSize.height * 0.070,
decoration:
Helpers.containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)),
decoration: Helpers.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC)),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
@ -105,8 +106,296 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
);
}
Widget getSelectedTreatmentStepItem(BuildContext _context) {
return Container();
List<Widget> getSelectedTreatmentStepItem(BuildContext _context) {
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).temperature} (C):",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.temperatureCelcius}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).temperature} (C):",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
Expanded(
child: AppText(
"${widget.vitalSign.temperatureCelcius}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
),
Row(
children: [
AppText(
"${TranslationBase.of(context).temperature} (F):",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.temperatureCelcius * (9 / 5) + 32}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).temperature} (F):",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
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: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).pulseBeats}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.pulseBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).pulseBeats}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
Expanded(
child: AppText(
"${widget.vitalSign.pulseBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
),
Row(
children: [
AppText(
"${TranslationBase.of(context).rhythm}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.pulseRhythm}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).rhythm}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).respBeats}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.respirationBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).respBeats}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
Expanded(
child: AppText(
"${widget.vitalSign.respirationBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
),
Row(
children: [
AppText(
"${TranslationBase.of(context).patternOfRespiration}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.respirationPattern}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).patternOfRespiration}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).bloodPressureDiastoleAndSystole}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).bloodPressureDiastoleAndSystole}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
Expanded(
child: AppText(
"${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
),
Row(
children: [
AppText(
"${TranslationBase.of(context).cuffLocation}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressureCuffLocation}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).cuffLocation}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).patientPosition}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressurePatientPosition}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).patientPosition}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
SizedBox(
width: 8,
),
Expanded(
child: AppText(
"${widget.vitalSign.bloodPressurePatientPosition}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
),
Row(
children: [
AppText(
"${TranslationBase.of(context).cuffSize}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressureCuffSize}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
children: [
AppText(
"${TranslationBase.of(context).cuffSize}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressureCuffSize}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
),
],
),
@ -953,43 +1020,47 @@ class _PainScaleWidgetState extends State<PainScaleWidget> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).painScale}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.painScore}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
children: [
AppText(
"${TranslationBase.of(context).painScale}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.painScore}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
),
Row(
children: [
AppText(
"${TranslationBase.of(context).painManagement}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.isPainManagementDone}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
Expanded(
child: Row(
children: [
AppText(
"${TranslationBase.of(context).painManagement}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.isPainManagementDone}",
fontSize: SizeConfig.textMultiplier * 2,
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/util/dr_app_toast_msg.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/app_buttons_widget.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:flutter/material.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 strengthController = TextEditingController();
TextEditingController routeController = TextEditingController();
TextEditingController frequencyController = TextEditingController();
TextEditingController indicationController = TextEditingController();
TextEditingController instructions = TextEditingController();
TextEditingController instructionController = TextEditingController();
TextEditingController drugIdController = TextEditingController();
TextEditingController doseController = TextEditingController();
@ -267,10 +305,12 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
maxLines: 6,
minLines: 4,
hintText: TranslationBase.of(context)
.instruction,
controller: indicationController,
keyboardType: TextInputType.number,
controller: instructionController,
//keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)

@ -45,23 +45,49 @@ class AddRescheduleLeavScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppTextFormField(
hintText:
TranslationBase.of(context).requestLeave,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
Icons.add_circle,
color: Colors.red,
)),
textInputType: TextInputType.text,
InkWell(
child: Row(
children: [
Expanded(
flex: 4,
child: AppText(
TranslationBase.of(context)
.requestLeave),
),
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: () {
openLeave(
context,
false,
);
},
inputFormatter: ONLY_LETTERS,
)
],
),
@ -158,7 +184,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
AppText(getDoctor(
model
.coveringDoctors,
item.doctorId))
item.coveringDoctorId))
])
: SizedBox(),
AppText(
@ -272,7 +298,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
getDoctor(model, doctorId) {
var obj;
obj = model.where((i) => i['doctorID'] == doctorId).toList();
obj = model.where((i) => i['doctorID'].toString() == doctorId).toList();
print(obj);
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/screens/base/base_view.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/text_validator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -50,10 +51,11 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
var clinicID;
TextEditingController _controller4;
void _presentDatePicker(id) {
var date = new DateTime.now();
showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime.now(),
initialDate: new DateTime(date.year, date.month, date.day + 15),
firstDate: new DateTime(date.year, date.month, date.day + 15),
lastDate: DateTime(2050),
).then((pickedDate) {
if (pickedDate == null) {
@ -130,10 +132,12 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
child: DropdownButton(
focusColor: Colors.grey,
isExpanded: true,
dropdownColor:
Colors.grey,
value: getClinicName(
model) ??
"",
iconSize: 40,
iconSize: 0,
elevation: 16,
selectedItemBuilder:
(BuildContext
@ -151,8 +155,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig
.textMultiplier *
2.1,
color:
Colors.grey,
color: Colors
.grey[500],
),
],
);
@ -234,7 +238,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
child:
DropdownButtonHideUnderline(
child: DropdownButton(
focusColor: Colors.grey,
// focusColor: Colors.grey,
isExpanded: true,
value: offTime == null
? model2.allOffTime[0]
@ -256,8 +260,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig
.textMultiplier *
2.1,
color:
Colors.grey,
// color:
// Colors.grey,
),
],
);
@ -560,8 +564,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig
.textMultiplier *
2.1,
color:
Colors.grey,
// color:
// Colors.grey,
),
],
);
@ -654,8 +658,6 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
fontSize: SizeConfig
.textMultiplier *
2.1,
color:
Colors.grey,
),
],
);
@ -731,9 +733,10 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
getProfile() async {
Map p = await sharedPref.getObj(DOCTOR_PROFILE);
setState(() {
this.profile = p;
if (widget.updateData != null) {
this.profile = p;
this.clinicID = widget.updateData.clinicId;
_toDateController.text = widget.updateData.dateTimeFrom;
@ -756,7 +759,7 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
"requisitionNo": 0,
"requisitionType": offTime,
"clinicId": this.profile['ClinicID'],
"doctorId": this.profile['ClinicID'],
"doctorId": this.profile['DoctorID'],
"dateTimeFrom": df.format(fromDate),
"dateTimeTo": df.format(toDate),
"date": df.format(DateTime.now()),
@ -779,7 +782,9 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
};
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,
"requisitionType": offTime,
"clinicId": this.profile['ClinicID'],
"doctorId": this.profile['ClinicID'],
"doctorId": this.profile['DoctorID'],
"dateTimeFrom": df.format(fromDate),
"dateTimeTo": df.format(toDate),
"date": df.format(DateTime.now()),

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

@ -532,6 +532,22 @@ class TranslationBase {
localizedValues['selectAllergy'][locale.languageCode];
String get selectSeverity =>
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 referralEmptyMsg => localizedValues['referralEmptyMsg'][locale.languageCode];
String get referralSuccessMsg => localizedValues['referralSuccessMsg'][locale.languageCode];

@ -461,7 +461,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
version: "0.6.3-nullsafety.1"
json_annotation:
dependency: transitive
description:
@ -503,7 +503,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:
@ -760,7 +760,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
stream_channel:
dependency: transitive
description:
@ -895,5 +895,5 @@ packages:
source: hosted
version: "2.2.1"
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"

Loading…
Cancel
Save