Merge branch 'development' into feature-ucaf

merge-requests/227/head
mosazaid 4 years ago
commit a51239447b

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,

@ -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);

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,
)),
);
},
),
);
})
],
), ),
), ),
), ),

@ -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)

@ -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