Merge branch 'development' into release-hot-fix

# Conflicts:
#	lib/screens/patients/profile/patient_profile_screen.dart
#	lib/widgets/patients/profile/PatientProfileButton.dart
#	lib/widgets/patients/profile/profile_medical_info_widget.dart
merge-requests/552/head
mosazaid 5 years ago
commit 596f518525

@ -27,9 +27,9 @@ class RadiologyService extends BaseService {
}, body: body);
}
Future getPatientRadOrders(PatiantInformtion patient) async {
Future getPatientRadOrders(PatiantInformtion patient , {isInPatient = false}) async {
String url = GET_PATIENT_ORDERS;
if(patient.patientType == 1) {
if(isInPatient) {
url = GET_IN_PATIENT_ORDERS;
}
hasError = false;
@ -38,7 +38,7 @@ class RadiologyService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
finalRadiologyList.clear();
String label = "ListRAD";
if(patient.patientType == 1) {
if(isInPatient) {
label ="List_GetRadOreders";
}
response[label].forEach((radiology) {

@ -137,11 +137,12 @@ class ProcedureViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
//await getProcedure(mrn: mrn);
}
void getPatientRadOrders(PatiantInformtion patient,{String patientType}) async {
void getPatientRadOrders(PatiantInformtion patient,{String patientType, bool isInPatient = false}) async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient);
await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient);
if (_radiologyService.hasError) {
error = _radiologyService.error;
if(patientType=="7")

@ -20,9 +20,9 @@ class RadiologyViewModel extends BaseViewModel {
? _finalRadiologyListClinic
: _finalRadiologyListHospital;
void getPatientRadOrders(PatiantInformtion patient) async {
void getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient);
await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient);
if (_radiologyService.hasError) {
error = _radiologyService.error;
setState(ViewState.Error);

@ -40,7 +40,7 @@ class _InsuranceApprovalScreenNewState
String patientType = routeArgs['patientType'];
return BaseView<InsuranceViewModel>(
onModelReady: patientType == "1"
onModelReady: patient.admissionNo != null
? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
: patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient,
@ -54,7 +54,7 @@ class _InsuranceApprovalScreenNewState
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).approvals,
body: patientType == "1"
body: patient.admissionNo != null
? SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(

@ -43,7 +43,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.insuranceApprovalInPatient.length == 0
? patientType == "1"
? patient.admissionNo != null
? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
: patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient,
@ -57,7 +57,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
baseViewModel: model,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString(), patient.arrivedOn),
body: patientType == "1"
body: patient.admissionNo != null
? SingleChildScrollView(
child: Container(
child: Column(

@ -646,6 +646,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
isInpatient,
"arrivalType":
arrivalType,
"isInpatient":isInpatient
});
},
);

@ -46,49 +46,6 @@ class PatientProfileScreen extends StatelessWidget {
}
return BaseView<PatientViewModel>(
onModelReady: (patientViewModel) async {
PatientModel patientReq = PatientModel(
ProjectID: 0,
ClinicID: 0,
DoctorID: 0,
FirstName: "0",
MiddleName: "0",
LastName: "0",
PatientMobileNumber: "0",
PatientIdentificationID: "0",
PatientID: patient.patientId,
From: "0",
To: "0",
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
Channel: 9,
TokenID: "@dm!n",
SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true,
PatientOutSA: false);
if (patientType == "1" &&
(patient.admissionNo == null || patient.admissionNo == "0")) {
patientViewModel
.getPatientList(patientReq, "1", isBusyLocal: false)
.then((response) {
if (response['MessageStatus'] == 1) {
if (response['List_MyInPatient'] != null) {
List<PatiantInformtion> patientList =
ModelResponse.fromJson(response['List_MyInPatient']).list;
patient.admissionNo = patientList[0].admissionNo;
patient.admissionDate = patientList[0].admissionDate;
} else {
DrAppToastMsg.showErrorToast('No patient');
}
}
}).catchError((error) {
print(error);
});
}
},
builder: (_, patientViewModel, w) => AppScaffold(
baseViewModel: patientViewModel,
appBarTitle: TranslationBase.of(context).patientProfile,
@ -119,6 +76,7 @@ class PatientProfileScreen extends StatelessWidget {
arrivalType: arrivalType,
from: from,
to: to,
isInpatient:isInpatient,
)
: isFromSearch
? ProfileMedicalInfoWidgetSearch(
@ -127,6 +85,7 @@ class PatientProfileScreen extends StatelessWidget {
arrivalType: arrivalType,
from: from,
to: to,
isInpatient:false
)
: ProfileMedicalInfoWidget(
patient: patient,
@ -134,6 +93,7 @@ class PatientProfileScreen extends StatelessWidget {
arrivalType: arrivalType,
from: from,
to: to,
isInpatient:isInpatient
),
],
),

@ -28,9 +28,11 @@ class RadiologyHomePage extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient,patientType: patientType),
onModelReady: (model) =>
model.getPatientRadOrders(patient, patientType: patientType, isInPatient: isInpatient),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
backgroundColor: Colors.grey[100],
@ -46,27 +48,29 @@ class RadiologyHomePage extends StatelessWidget {
SizedBox(
height: 12,
),
if(model.radiologyList.isNotEmpty && patient.patientStatusType != 43)
if (model.radiologyList.isNotEmpty &&
patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Radiology',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Result',
bold: true,
fontSize: 22,
),
],
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Radiology',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
'Result',
bold: true,
fontSize: 22,
),
],
),
),
),
if(patient.patientStatusType == 43)
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -86,19 +90,21 @@ class RadiologyHomePage extends StatelessWidget {
],
),
),
if (patientType != null &&
patientType == '7' &&
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
AddNewOrder( onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedRadiologyOrder(
patient: patient,
model: model,
)),
);
},label: 'Apply for Radiology Order',),
AddNewOrder(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedRadiologyOrder(
patient: patient,
model: model,
)),
);
},
label: 'Apply for Radiology Order',
),
...List.generate(
model.radiologyList.length,
(index) => InkWell(
@ -111,27 +117,31 @@ class RadiologyHomePage extends StatelessWidget {
),
),
),
child: DoctorCard(
child: DoctorCard(
doctorName: model.radiologyList[index].doctorName,
profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}',
clinic: model.radiologyList[index].clinicDescription,
appointmentDate: model.radiologyList[index].orderDate ?? model.radiologyList[index].reportData,
),
)),
if(model.radiologyList.isEmpty && patient.patientStatusType != 43)
appointmentDate:
model.radiologyList[index].orderDate ??
model.radiologyList[index].reportData,
),
)),
if (model.radiologyList.isEmpty &&
patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 100,),
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText('No Radiology Found'),
)
],
),
)

@ -31,16 +31,17 @@ class PrescriptionsPage extends StatelessWidget {
String arrivalType = routeArgs['arrivalType'];
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionViewModel>(
onModelReady: (model) => patientType == "1"
? model.getPrescriptionsInPatient(patient)
: model.getPrescriptions(patient, patientType: patientType),
onModelReady: (model) =>
patient.admissionNo != null && patient.admissionNo != "0"
? model.getPrescriptionsInPatient(patient)
: model.getPrescriptions(patient, patientType: patientType),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Colors.grey[100],
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType ?? '0', arrivalType),
body: patientType != "1"
body: patient.admissionNo == null
? FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
@ -70,7 +71,8 @@ class PrescriptionsPage extends StatelessWidget {
],
),
),
if (patient.patientStatusType == 43)
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -90,8 +92,7 @@ class PrescriptionsPage extends StatelessWidget {
],
),
),
if (patientType != null &&
patientType == '7' &&
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
AddNewOrder(
onTap: () {
@ -211,7 +212,8 @@ class PrescriptionsPage extends StatelessWidget {
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText('No Prescriptions Found'),
child: AppText(
'No Prescriptions Found In Patentiss'),
)
],
),

@ -69,7 +69,8 @@ class ProcedureScreen extends StatelessWidget {
],
),
),
if (patient.patientStatusType == 43)
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -89,8 +90,7 @@ class ProcedureScreen extends StatelessWidget {
],
),
),
if (patientType != null &&
patientType == '7' &&
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
InkWell(
onTap: () {

@ -22,6 +22,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final bool isInpatient;
ProfileMedicalInfoWidget(
{Key key,
@ -29,7 +30,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
this.patientType,
this.arrivalType,
this.from,
this.to});
this.to, this.isInpatient});
@override
Widget build(BuildContext context) {
@ -79,6 +80,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient:isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
@ -164,7 +166,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'),
if (patient.admissionNo!=null && patient.admissionNo!="0")
if (isInpatient)
PatientProfileButton(
key: key,
patient: patient,
@ -174,7 +176,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
if (patientType == "1")
if (isInpatient)
PatientProfileButton(
key: key,
patient: patient,

@ -22,6 +22,9 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final bool isInpatient;
ProfileMedicalInfoWidgetInPatient(
{Key key,
@ -29,7 +32,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
this.patientType,
this.arrivalType,
this.from,
this.to});
this.to, this.isInpatient});
@override
Widget build(BuildContext context) {
@ -70,6 +73,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).result,
@ -98,8 +102,8 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
nameLine1:"Order", //"Text",
nameLine2: "Sheet",//TranslationBase.of(context).orders,
nameLine1: "Order", //"Text",
nameLine2: "Sheet", //TranslationBase.of(context).orders,
icon: 'patient/Progress_notes.png'),
PatientProfileButton(
key: key,
@ -128,9 +132,9 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
arrivalType: arrivalType,
isDisable: true,
route: MEDICAL_FILE,
nameLine1: "Medical",//Health
nameLine1: "Medical", //Health
//TranslationBase.of(context).medicalReport,
nameLine2: "Report",//Report
nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(

@ -13,6 +13,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final bool isInpatient;
ProfileMedicalInfoWidgetSearch(
{Key key,
@ -20,7 +21,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
this.patientType,
this.arrivalType,
this.from,
this.to});
this.to, this.isInpatient});
@override
Widget build(BuildContext context) {
@ -51,8 +52,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: "Health" ,//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",//TranslationBase.of(context).summaryReport,
nameLine1: "Health", //TranslationBase.of(context).medicalReport,
nameLine2: "Summary", //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
@ -68,6 +69,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient:isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
@ -127,7 +129,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
if (patient.admissionNo!=null && patient.admissionNo!="0")
if (patient.admissionNo != null && patient.admissionNo != "0")
PatientProfileButton(
key: key,
patient: patient,
@ -137,32 +139,27 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
if (patient.admissionNo!=null && patient.admissionNo!="0")
if (patient.admissionNo != null && patient.admissionNo != "0")
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
nameLine1:"Order", //"Text",
nameLine1: "Order", //"Text",
nameLine2: "Sheet",
icon: 'patient/Progress_notes.png'),
if (patient.appointmentNo!=null && patient.appointmentNo!=0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
// isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
// isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
],
),
);

Loading…
Cancel
Save