first step form create episode
parent
caddbdb53c
commit
4f1a892be4
@ -0,0 +1,28 @@
|
||||
class PostEpisodeReqModel {
|
||||
int appointmentNo;
|
||||
int patientMRN;
|
||||
int doctorID;
|
||||
String vidaAuthTokenID;
|
||||
|
||||
PostEpisodeReqModel(
|
||||
{this.appointmentNo,
|
||||
this.patientMRN,
|
||||
this.doctorID,
|
||||
this.vidaAuthTokenID});
|
||||
|
||||
PostEpisodeReqModel.fromJson(Map<String, dynamic> json) {
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
patientMRN = json['PatientMRN'];
|
||||
doctorID = json['DoctorID'];
|
||||
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['PatientMRN'] = this.patientMRN;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -1,92 +1,112 @@
|
||||
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||
import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.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/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
|
||||
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';
|
||||
|
||||
class PatientPageHeaderWidget extends StatelessWidget {
|
||||
|
||||
final PatiantInformtion patient;
|
||||
|
||||
String allergiesString='';
|
||||
PatientPageHeaderWidget(this.patient);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
AvatarWidget(
|
||||
Icon(
|
||||
patient.genderDescription == "Male"
|
||||
? DoctorApp.male
|
||||
: DoctorApp.female_icon,
|
||||
size: 70,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
AppText(
|
||||
patient.firstName + ' ' + patient.lastName,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase.of(context).age,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
return BaseView<SOAPViewModel>(
|
||||
onModelReady: (model) async {
|
||||
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
|
||||
patientMRN: patient.patientMRN,
|
||||
episodeId: patient.episodeNo,
|
||||
appointmentNo: patient.appointmentNo,
|
||||
doctorID: '',
|
||||
editedBy: '');
|
||||
await model.getPatientAllergy(generalGetReqForSOAP);
|
||||
model.patientAllergiesList.forEach((element) {
|
||||
allergiesString += element.allergyDiseaseName+' , ';
|
||||
});
|
||||
},
|
||||
builder: (_, model, w) => Container(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
AvatarWidget(
|
||||
Icon(
|
||||
patient.genderDescription == "Male"
|
||||
? DoctorApp.male
|
||||
: DoctorApp.female_icon,
|
||||
size: 70,
|
||||
color: Colors.white,
|
||||
),
|
||||
AppText(
|
||||
patient.age.toString(),
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
AppText(
|
||||
patient.firstName + ' ' + patient.lastName,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase.of(context).age,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
AppText(
|
||||
patient.age.toString(),
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
],
|
||||
),
|
||||
NetworkBaseView(
|
||||
baseViewModel: model,
|
||||
child: AppText(
|
||||
"ALLERGIC TO: $allergiesString",
|
||||
color: Color(0xFFB9382C),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
AppText(
|
||||
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE",
|
||||
color: Color(0xFFB9382C),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 1,
|
||||
color: Color(0xffCCCCCC),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 1,
|
||||
color: Color(0xffCCCCCC),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue