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;
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,

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

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

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

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