Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into login_home_design
Conflicts: lib/screens/home/home_patient_card.dart lib/screens/home/home_screen.dartmerge-requests/723/head
commit
387f75b36c
@ -0,0 +1,16 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M8,8l-2,0l0,9l11,0l0,-2l-9,0z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M22,3H10v10h12V3zM20,11h-8V7h8V11z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M4,12l-2,0l0,9l11,0l0,-2l-9,0z"/>
|
||||||
|
</vector>
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="1000dp"/>
|
||||||
|
|
||||||
|
<solid android:color="@color/green_dark"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
enum PatientType{
|
||||||
|
IN_PATIENT,
|
||||||
|
OUT_PATIENT,
|
||||||
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
class MyReferralPatientRequestModel {
|
||||||
|
int channel;
|
||||||
|
int clinicID;
|
||||||
|
int doctorID;
|
||||||
|
int editedBy;
|
||||||
|
String firstName;
|
||||||
|
String from;
|
||||||
|
String iPAdress;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
int languageID;
|
||||||
|
String lastName;
|
||||||
|
String middleName;
|
||||||
|
int patientID;
|
||||||
|
String patientIdentificationID;
|
||||||
|
String patientMobileNumber;
|
||||||
|
bool patientOutSA;
|
||||||
|
int patientTypeID;
|
||||||
|
int projectID;
|
||||||
|
String sessionID;
|
||||||
|
String stamp;
|
||||||
|
String to;
|
||||||
|
String tokenID;
|
||||||
|
double versionID;
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
|
||||||
|
MyReferralPatientRequestModel(
|
||||||
|
{this.channel,
|
||||||
|
this.clinicID,
|
||||||
|
this.doctorID,
|
||||||
|
this.editedBy,
|
||||||
|
this.firstName,
|
||||||
|
this.from,
|
||||||
|
this.iPAdress,
|
||||||
|
this.isLoginForDoctorApp,
|
||||||
|
this.languageID,
|
||||||
|
this.lastName,
|
||||||
|
this.middleName,
|
||||||
|
this.patientID,
|
||||||
|
this.patientIdentificationID,
|
||||||
|
this.patientMobileNumber,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.patientTypeID,
|
||||||
|
this.projectID,
|
||||||
|
this.sessionID,
|
||||||
|
this.stamp,
|
||||||
|
this.to,
|
||||||
|
this.tokenID,
|
||||||
|
this.versionID,
|
||||||
|
this.vidaAuthTokenID});
|
||||||
|
|
||||||
|
MyReferralPatientRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
channel = json['Channel'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
firstName = json['FirstName'];
|
||||||
|
from = json['From'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
lastName = json['LastName'];
|
||||||
|
middleName = json['MiddleName'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
patientIdentificationID = json['PatientIdentificationID'];
|
||||||
|
patientMobileNumber = json['PatientMobileNumber'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
to = json['To'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['FirstName'] = this.firstName;
|
||||||
|
data['From'] = this.from;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['LastName'] = this.lastName;
|
||||||
|
data['MiddleName'] = this.middleName;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||||
|
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['stamp'] = this.stamp;
|
||||||
|
data['To'] = this.to;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
class AddReferredRemarksRequestModel {
|
||||||
|
int projectID;
|
||||||
|
int admissionNo;
|
||||||
|
int lineItemNo;
|
||||||
|
String referredDoctorRemarks;
|
||||||
|
int editedBy;
|
||||||
|
int referalStatus;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
String iPAdress;
|
||||||
|
bool patientOutSA;
|
||||||
|
String tokenID;
|
||||||
|
int languageID;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String sessionID;
|
||||||
|
int deviceTypeID;
|
||||||
|
|
||||||
|
AddReferredRemarksRequestModel(
|
||||||
|
{this.projectID,
|
||||||
|
this.admissionNo,
|
||||||
|
this.lineItemNo,
|
||||||
|
this.referredDoctorRemarks,
|
||||||
|
this.editedBy,
|
||||||
|
this.referalStatus,
|
||||||
|
this.isLoginForDoctorApp,
|
||||||
|
this.iPAdress,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.tokenID,
|
||||||
|
this.languageID,
|
||||||
|
this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.sessionID,
|
||||||
|
this.deviceTypeID});
|
||||||
|
|
||||||
|
AddReferredRemarksRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
lineItemNo = json['LineItemNo'];
|
||||||
|
referredDoctorRemarks = json['ReferredDoctorRemarks'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
referalStatus = json['ReferalStatus'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
deviceTypeID = json['DeviceTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['LineItemNo'] = this.lineItemNo;
|
||||||
|
data['ReferredDoctorRemarks'] = this.referredDoctorRemarks;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['ReferalStatus'] = this.referalStatus;
|
||||||
|
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['DeviceTypeID'] = this.deviceTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class NavigationService {
|
||||||
|
final GlobalKey<NavigatorState> navigatorKey =
|
||||||
|
new GlobalKey<NavigatorState>();
|
||||||
|
Future<dynamic> navigateTo(String routeName) {
|
||||||
|
return navigatorKey.currentState.pushNamed(routeName);
|
||||||
|
}
|
||||||
|
Future<dynamic> pushNamedAndRemoveUntil(String routeName) {
|
||||||
|
return navigatorKey.currentState.pushNamedAndRemoveUntil(routeName,(asd)=>false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
|
||||||
|
class ScanQrService extends BaseService {
|
||||||
|
List<PatiantInformtion> myInPatientList = List();
|
||||||
|
List<PatiantInformtion> inPatientList = List();
|
||||||
|
|
||||||
|
Future getInPatient(PatientSearchRequestModel requestModel, bool isMyInpatient) async {
|
||||||
|
hasError = false;
|
||||||
|
await getDoctorProfile();
|
||||||
|
|
||||||
|
if (isMyInpatient) {
|
||||||
|
requestModel.doctorID = doctorProfile.doctorID;
|
||||||
|
} else {
|
||||||
|
requestModel.doctorID = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_PATIENT_IN_PATIENT_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
inPatientList.clear();
|
||||||
|
myInPatientList.clear();
|
||||||
|
|
||||||
|
response['List_MyInPatient'].forEach((v) {
|
||||||
|
PatiantInformtion patient = PatiantInformtion.fromJson(v);
|
||||||
|
inPatientList.add(patient);
|
||||||
|
if (patient.doctorId == doctorProfile.doctorID) {
|
||||||
|
myInPatientList.add(patient);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: requestModel.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,36 +0,0 @@
|
|||||||
import 'package:doctor_app_flutter/config/config.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
|
||||||
import 'package:doctor_app_flutter/models/doctor/verify_referral_doctor_remarks.dart';
|
|
||||||
import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
|
|
||||||
|
|
||||||
class ReferredPatientService extends BaseService {
|
|
||||||
List<MyReferredPatientModel> _listMyReferredPatientModel = [];
|
|
||||||
|
|
||||||
List<MyReferredPatientModel> get listMyReferredPatientModel =>
|
|
||||||
_listMyReferredPatientModel;
|
|
||||||
|
|
||||||
RequestMyReferralPatientModel _requestMyReferralPatient =
|
|
||||||
RequestMyReferralPatientModel();
|
|
||||||
VerifyReferralDoctorRemarks _verifyreferraldoctorremarks =
|
|
||||||
VerifyReferralDoctorRemarks();
|
|
||||||
|
|
||||||
Future getMyReferredPatient() async {
|
|
||||||
await baseAppClient.post(
|
|
||||||
GET_MY_REFERRED_PATIENT,
|
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
|
||||||
_listMyReferredPatientModel.clear();
|
|
||||||
response['List_MyReferredPatient'].forEach((v) {
|
|
||||||
listMyReferredPatientModel.add(MyReferredPatientModel.fromJson(v));
|
|
||||||
});
|
|
||||||
// print(response['List_MyReferredPatient']);
|
|
||||||
},
|
|
||||||
onFailure: (String error, int statusCode) {
|
|
||||||
hasError = true;
|
|
||||||
super.error = error;
|
|
||||||
},
|
|
||||||
body: _requestMyReferralPatient.toJson(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart';
|
||||||
|
|
||||||
|
class SpecialClinicsService extends BaseService {
|
||||||
|
|
||||||
|
|
||||||
|
List<GetSpecialClinicalCareListResponseModel> _specialClinicalCareList = [];
|
||||||
|
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList => _specialClinicalCareList;
|
||||||
|
|
||||||
|
List<GetSpecialClinicalCareMappingListResponseModel> _specialClinicalCareMappingList = [];
|
||||||
|
List<GetSpecialClinicalCareMappingListResponseModel> get specialClinicalCareMappingList => _specialClinicalCareMappingList;
|
||||||
|
Future getSpecialClinicalCareList() async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_SPECIAL_CLINICAL_CARE_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
|
||||||
|
_specialClinicalCareList.clear();
|
||||||
|
response['List_SpecialClinicalCareList'].forEach((v) {
|
||||||
|
_specialClinicalCareList.add(GetSpecialClinicalCareListResponseModel.fromJson(v));
|
||||||
|
});},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: {
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Future getSpecialClinicalCareMappingList(int clinicId) async {
|
||||||
|
hasError = false;
|
||||||
|
await baseAppClient.post(
|
||||||
|
GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
|
||||||
|
_specialClinicalCareMappingList.clear();
|
||||||
|
response['List_SpecialClinicalCareMappingList'].forEach((v) {
|
||||||
|
_specialClinicalCareMappingList.add(GetSpecialClinicalCareMappingListResponseModel.fromJson(v));
|
||||||
|
});},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: {
|
||||||
|
"ClinicID": clinicId,
|
||||||
|
"DoctorID":0,
|
||||||
|
"EditedBy":0
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,24 +0,0 @@
|
|||||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/service/patient/referred_patient_service.dart';
|
|
||||||
import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
|
|
||||||
|
|
||||||
import '../../locator.dart';
|
|
||||||
import 'base_view_model.dart';
|
|
||||||
|
|
||||||
class ReferredPatientViewModel extends BaseViewModel {
|
|
||||||
ReferredPatientService _referralPatientService =
|
|
||||||
locator<ReferredPatientService>();
|
|
||||||
|
|
||||||
List<MyReferredPatientModel> get listMyReferredPatientModel =>
|
|
||||||
_referralPatientService.listMyReferredPatientModel;
|
|
||||||
|
|
||||||
Future getMyReferredPatient() async {
|
|
||||||
setState(ViewState.Busy);
|
|
||||||
await _referralPatientService.getMyReferredPatient();
|
|
||||||
if (_referralPatientService.hasError) {
|
|
||||||
error = _referralPatientService.error;
|
|
||||||
setState(ViewState.Error);
|
|
||||||
} else
|
|
||||||
setState(ViewState.Idle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/home/scan_qr_service.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/locator.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
|
||||||
|
class ScanQrViewModel extends BaseViewModel {
|
||||||
|
ScanQrService _scanQrService = locator<ScanQrService>();
|
||||||
|
List<PatiantInformtion> get inPatientList => _scanQrService.inPatientList;
|
||||||
|
|
||||||
|
Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false}) async {
|
||||||
|
await getDoctorProfile();
|
||||||
|
setState(ViewState.Busy);
|
||||||
|
|
||||||
|
await _scanQrService.getInPatient(requestModel, false);
|
||||||
|
if (_scanQrService.hasError) {
|
||||||
|
error = _scanQrService.error;
|
||||||
|
|
||||||
|
setState(ViewState.ErrorLocal);
|
||||||
|
} else {
|
||||||
|
// setDefaultInPatientList();
|
||||||
|
setState(ViewState.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
class GetSpecialClinicalCareListResponseModel {
|
||||||
|
int projectID;
|
||||||
|
int clinicID;
|
||||||
|
String clinicDescription;
|
||||||
|
String clinicDescriptionN;
|
||||||
|
bool isActive;
|
||||||
|
|
||||||
|
GetSpecialClinicalCareListResponseModel(
|
||||||
|
{this.projectID,
|
||||||
|
this.clinicID,
|
||||||
|
this.clinicDescription,
|
||||||
|
this.clinicDescriptionN,
|
||||||
|
this.isActive});
|
||||||
|
|
||||||
|
GetSpecialClinicalCareListResponseModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
clinicDescription = json['ClinicDescription'];
|
||||||
|
clinicDescriptionN = json['ClinicDescriptionN'];
|
||||||
|
isActive = json['IsActive'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['ClinicDescription'] = this.clinicDescription;
|
||||||
|
data['ClinicDescriptionN'] = this.clinicDescriptionN;
|
||||||
|
data['IsActive'] = this.isActive;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
class GetSpecialClinicalCareMappingListResponseModel {
|
||||||
|
int mappingProjectID;
|
||||||
|
int clinicID;
|
||||||
|
int nursingStationID;
|
||||||
|
bool isActive;
|
||||||
|
int projectID;
|
||||||
|
String description;
|
||||||
|
|
||||||
|
GetSpecialClinicalCareMappingListResponseModel(
|
||||||
|
{this.mappingProjectID,
|
||||||
|
this.clinicID,
|
||||||
|
this.nursingStationID,
|
||||||
|
this.isActive,
|
||||||
|
this.projectID,
|
||||||
|
this.description});
|
||||||
|
|
||||||
|
GetSpecialClinicalCareMappingListResponseModel.fromJson(
|
||||||
|
Map<String, dynamic> json) {
|
||||||
|
mappingProjectID = json['MappingProjectID'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
nursingStationID = json['NursingStationID'];
|
||||||
|
isActive = json['IsActive'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
description = json['Description'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['MappingProjectID'] = this.mappingProjectID;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['NursingStationID'] = this.nursingStationID;
|
||||||
|
data['IsActive'] = this.isActive;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['Description'] = this.description;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,56 +1,56 @@
|
|||||||
class StartCallReq {
|
class StartCallReq {
|
||||||
int vCID;
|
String clincName;
|
||||||
bool isrecall;
|
int clinicId;
|
||||||
String tokenID;
|
String docSpec;
|
||||||
String generalid;
|
String docotrName;
|
||||||
int doctorId;
|
int doctorId;
|
||||||
|
String generalid;
|
||||||
bool isOutKsa;
|
bool isOutKsa;
|
||||||
|
bool isrecall;
|
||||||
String projectName;
|
String projectName;
|
||||||
String docotrName;
|
String tokenID;
|
||||||
String clincName;
|
int vCID;
|
||||||
String docSpec;
|
|
||||||
int clinicId;
|
|
||||||
|
|
||||||
StartCallReq(
|
StartCallReq(
|
||||||
{this.vCID,
|
{this.clincName,
|
||||||
this.isrecall,
|
this.clinicId,
|
||||||
this.tokenID,
|
this.docSpec,
|
||||||
this.generalid,
|
this.docotrName,
|
||||||
this.doctorId,
|
this.doctorId,
|
||||||
|
this.generalid,
|
||||||
this.isOutKsa,
|
this.isOutKsa,
|
||||||
|
this.isrecall,
|
||||||
this.projectName,
|
this.projectName,
|
||||||
this.docotrName,
|
this.tokenID,
|
||||||
this.clincName,
|
this.vCID});
|
||||||
this.docSpec,
|
|
||||||
this.clinicId});
|
|
||||||
|
|
||||||
StartCallReq.fromJson(Map<String, dynamic> json) {
|
StartCallReq.fromJson(Map<String, dynamic> json) {
|
||||||
vCID = json['VC_ID'];
|
clincName = json['clincName'];
|
||||||
isrecall = json['isrecall'];
|
clinicId = json['ClinicId'];
|
||||||
tokenID = json['TokenID'];
|
docSpec = json['Doc_Spec'];
|
||||||
generalid = json['generalid'];
|
docotrName = json['DocotrName'];
|
||||||
doctorId = json['DoctorId'];
|
doctorId = json['DoctorId'];
|
||||||
|
generalid = json['generalid'];
|
||||||
isOutKsa = json['IsOutKsa'];
|
isOutKsa = json['IsOutKsa'];
|
||||||
|
isrecall = json['isrecall'];
|
||||||
projectName = json['projectName'];
|
projectName = json['projectName'];
|
||||||
docotrName = json['DocotrName'];
|
tokenID = json['TokenID'];
|
||||||
clincName = json['clincName'];
|
vCID = json['VC_ID'];
|
||||||
docSpec = json['Doc_Spec'];
|
|
||||||
clinicId = json['ClinicId'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
data['VC_ID'] = this.vCID;
|
data['clincName'] = this.clincName;
|
||||||
data['isrecall'] = this.isrecall;
|
data['ClinicId'] = this.clinicId;
|
||||||
data['TokenID'] = this.tokenID;
|
data['Doc_Spec'] = this.docSpec;
|
||||||
data['generalid'] = this.generalid;
|
data['DocotrName'] = this.docotrName;
|
||||||
data['DoctorId'] = this.doctorId;
|
data['DoctorId'] = this.doctorId;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
data['IsOutKsa'] = this.isOutKsa;
|
data['IsOutKsa'] = this.isOutKsa;
|
||||||
|
data['isrecall'] = this.isrecall;
|
||||||
data['projectName'] = this.projectName;
|
data['projectName'] = this.projectName;
|
||||||
data['DocotrName'] = this.docotrName;
|
data['TokenID'] = this.tokenID;
|
||||||
data['clincName'] = this.clincName;
|
data['VC_ID'] = this.vCID;
|
||||||
data['Doc_Spec'] = this.docSpec;
|
|
||||||
data['ClinicId'] = this.clinicId;
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/date-utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.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:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../routes.dart';
|
||||||
|
|
||||||
|
class ReplySummeryOnReferralPatient extends StatefulWidget {
|
||||||
|
final MyReferralPatientModel referredPatient;
|
||||||
|
final String doctorReply;
|
||||||
|
|
||||||
|
ReplySummeryOnReferralPatient(this.referredPatient, this.doctorReply);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ReplySummeryOnReferralPatientState createState() =>
|
||||||
|
_ReplySummeryOnReferralPatientState(this.referredPatient);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ReplySummeryOnReferralPatientState
|
||||||
|
extends State<ReplySummeryOnReferralPatient> {
|
||||||
|
final MyReferralPatientModel referredPatient;
|
||||||
|
|
||||||
|
_ReplySummeryOnReferralPatientState(this.referredPatient);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<PatientReferralViewModel>(
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: TranslationBase.of(context).summeryReply,
|
||||||
|
body: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
margin:
|
||||||
|
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 16, vertical: 16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||||
|
border: Border.fromBorderSide(BorderSide(
|
||||||
|
color: Colors.white,
|
||||||
|
width: 1.0,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).reply,
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
fontSize: 2.4 * SizeConfig.textMultiplier,
|
||||||
|
color: Color(0XFF2E303A),
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
widget.doctorReply ?? '',
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
||||||
|
color: Color(0XFF2E303A),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: AppButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
title: TranslationBase.of(context).cancel,
|
||||||
|
fontColor: Colors.white,
|
||||||
|
color: Colors.red[600],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 4,),
|
||||||
|
Expanded(
|
||||||
|
child: AppButton(
|
||||||
|
onPressed: () {},
|
||||||
|
title: TranslationBase.of(context).noteConfirm,
|
||||||
|
fontColor: Colors.white,
|
||||||
|
color: Colors.green[600],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,591 +0,0 @@
|
|||||||
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.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/screens/prescription/add_prescription_form.dart';
|
|
||||||
import 'package:doctor_app_flutter/screens/prescription/update_prescription_form.dart';
|
|
||||||
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
||||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.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:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class NewPrescriptionScreen extends StatefulWidget {
|
|
||||||
@override
|
|
||||||
_NewPrescriptionScreenState createState() => _NewPrescriptionScreenState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
||||||
PersistentBottomSheetController _controller;
|
|
||||||
TextEditingController strengthController = TextEditingController();
|
|
||||||
int testNum = 0;
|
|
||||||
int strengthChar;
|
|
||||||
PatiantInformtion patient;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final screenSize = MediaQuery.of(context).size;
|
|
||||||
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
||||||
patient = routeArgs['patient'];
|
|
||||||
return BaseView<PrescriptionViewModel>(
|
|
||||||
onModelReady: (model) => model.getPrescription(mrn: patient.patientId),
|
|
||||||
builder: (BuildContext context, PrescriptionViewModel model, Widget child) => AppScaffold(
|
|
||||||
isShowAppBar: true,
|
|
||||||
appBarTitle: TranslationBase.of(context).prescription,
|
|
||||||
body: NetworkBaseView(
|
|
||||||
baseViewModel: model,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Container(
|
|
||||||
color: Colors.white,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
PatientPageHeaderWidget(patient),
|
|
||||||
Divider(
|
|
||||||
height: 1.0,
|
|
||||||
thickness: 1.0,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
(model.prescriptionList.length != 0)
|
|
||||||
? SizedBox(height: model.prescriptionList[0].rowcount == 0 ? 200.0 : 10.0)
|
|
||||||
: SizedBox(height: 200.0),
|
|
||||||
//model.prescriptionList == null
|
|
||||||
(model.prescriptionList.length != 0)
|
|
||||||
? model.prescriptionList[0].rowcount == 0
|
|
||||||
? Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
addPrescriptionForm(context, model, patient, model.prescriptionList);
|
|
||||||
//model.postPrescription();
|
|
||||||
},
|
|
||||||
child: CircleAvatar(
|
|
||||||
radius: 65,
|
|
||||||
backgroundColor: Color(0XFFB8382C),
|
|
||||||
child: CircleAvatar(
|
|
||||||
radius: 60,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
child: Icon(
|
|
||||||
Icons.add,
|
|
||||||
color: Colors.black,
|
|
||||||
size: 45.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 15.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context).noPrescriptionListed,
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.w900,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context).addNow,
|
|
||||||
color: Color(0XFFB8382C),
|
|
||||||
fontWeight: FontWeight.w900,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: Padding(
|
|
||||||
padding: EdgeInsets.all(14.0),
|
|
||||||
child: NetworkBaseView(
|
|
||||||
baseViewModel: model,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
child: Container(
|
|
||||||
height: 50.0,
|
|
||||||
width: 450.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
border: Border.all(color: Colors.grey),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.all(8.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
' Add more medication',
|
|
||||||
fontWeight: FontWeight.w100,
|
|
||||||
fontSize: 12.5,
|
|
||||||
),
|
|
||||||
Icon(
|
|
||||||
Icons.add,
|
|
||||||
color: Color(0XFFB8382C),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onTap: () {
|
|
||||||
addPrescriptionForm(context, model, patient, model.prescriptionList);
|
|
||||||
//model.postPrescription();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.0,
|
|
||||||
),
|
|
||||||
...List.generate(
|
|
||||||
model.prescriptionList[0].rowcount,
|
|
||||||
(index) => Container(
|
|
||||||
color: Colors.white,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: MediaQuery.of(context).size.height * 0.022,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// crossAxisAlignment:
|
|
||||||
// CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
color: Colors.white,
|
|
||||||
height: MediaQuery.of(context).size.height * 0.21,
|
|
||||||
width: MediaQuery.of(context).size.width * 0.1,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
(DateTime.parse(model.prescriptionList[0].entityList[index]
|
|
||||||
.createdOn) !=
|
|
||||||
null
|
|
||||||
? (DateTime.parse(model.prescriptionList[0]
|
|
||||||
.entityList[index].createdOn)
|
|
||||||
.year)
|
|
||||||
.toString()
|
|
||||||
: DateTime.now().year)
|
|
||||||
.toString(),
|
|
||||||
color: Colors.green,
|
|
||||||
fontSize: 13.5,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
AppDateUtils.getMonth(model.prescriptionList[0]
|
|
||||||
.entityList[index].createdOn !=
|
|
||||||
null
|
|
||||||
? (DateTime.parse(model.prescriptionList[0]
|
|
||||||
.entityList[index].createdOn)
|
|
||||||
.month)
|
|
||||||
: DateTime.now().month)
|
|
||||||
.toUpperCase(),
|
|
||||||
color: Colors.green,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
DateTime.parse(
|
|
||||||
model.prescriptionList[0].entityList[index].createdOn)
|
|
||||||
.day
|
|
||||||
.toString(),
|
|
||||||
color: Colors.green,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
AppDateUtils.getTimeFormated(DateTime.parse(model
|
|
||||||
.prescriptionList[0].entityList[index].createdOn))
|
|
||||||
.toString(),
|
|
||||||
color: Colors.green,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
color: Colors.white,
|
|
||||||
// height: MediaQuery.of(
|
|
||||||
// context)
|
|
||||||
// .size
|
|
||||||
// .height *
|
|
||||||
// 0.3499,
|
|
||||||
width: MediaQuery.of(context).size.width * 0.77,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'Start Date:',
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 14.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
AppDateUtils.getDateFormatted(DateTime.parse(model
|
|
||||||
.prescriptionList[0].entityList[index].startDate)),
|
|
||||||
fontSize: 13.5,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 6.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
'Order Type:',
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 14.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
model.prescriptionList[0].entityList[index]
|
|
||||||
.orderTypeDescription,
|
|
||||||
fontSize: 13.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.5,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
color: Colors.white,
|
|
||||||
child: Expanded(
|
|
||||||
child: AppText(
|
|
||||||
model.prescriptionList[0].entityList[index]
|
|
||||||
.medicationName,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 15.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.5,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
model.prescriptionList[0].entityList[index].doseDetail,
|
|
||||||
fontSize: 15.0,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'Indication: ',
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 17.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: RichText(
|
|
||||||
maxLines: 3,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
strutStyle: StrutStyle(fontSize: 12.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index]
|
|
||||||
.indication),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'UOM: ',
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 17.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: RichText(
|
|
||||||
maxLines: 3,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
strutStyle: StrutStyle(fontSize: 12.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(color: Colors.black),
|
|
||||||
text: model
|
|
||||||
.prescriptionList[0].entityList[index].uom),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'BOX Quantity: ',
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 17.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: RichText(
|
|
||||||
maxLines: 3,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
strutStyle: StrutStyle(fontSize: 12.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index]
|
|
||||||
.quantity
|
|
||||||
.toString() ==
|
|
||||||
null
|
|
||||||
? ""
|
|
||||||
: model.prescriptionList[0].entityList[index]
|
|
||||||
.quantity
|
|
||||||
.toString()),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'pharmacy Intervention ',
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 17.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: RichText(
|
|
||||||
maxLines: 3,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
strutStyle: StrutStyle(fontSize: 12.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index]
|
|
||||||
.pharmacyInervention ==
|
|
||||||
null
|
|
||||||
? ""
|
|
||||||
: model.prescriptionList[0].entityList[index]
|
|
||||||
.pharmacyInervention
|
|
||||||
.toString()),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 5.0),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'pharmacist Remarks : ',
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 15.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
model.prescriptionList[0].entityList[index]
|
|
||||||
.pharmacistRemarks ==
|
|
||||||
null
|
|
||||||
? ""
|
|
||||||
: model.prescriptionList[0].entityList[index]
|
|
||||||
.pharmacistRemarks,
|
|
||||||
fontSize: 15.0),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context).doctorName + ": ",
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
model.prescriptionList[0].entityList[index].doctorName,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 8.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'Doctor Remarks : ',
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontSize: 13.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
color: Colors.white,
|
|
||||||
// height: MediaQuery.of(context).size.height *
|
|
||||||
// 0.038,
|
|
||||||
child: RichText(
|
|
||||||
// maxLines:
|
|
||||||
// 2,
|
|
||||||
// overflow:
|
|
||||||
// TextOverflow.ellipsis,
|
|
||||||
strutStyle: StrutStyle(fontSize: 10.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index]
|
|
||||||
.remarks !=
|
|
||||||
null
|
|
||||||
? model.prescriptionList[0].entityList[index]
|
|
||||||
.remarks
|
|
||||||
: "",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.0,
|
|
||||||
),
|
|
||||||
|
|
||||||
// SizedBox(
|
|
||||||
// height: 40,
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
color: Colors.white,
|
|
||||||
height: MediaQuery.of(context).size.height * 0.16,
|
|
||||||
width: MediaQuery.of(context).size.width * 0.06,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
child: Icon(Icons.edit),
|
|
||||||
onTap: () {
|
|
||||||
updatePrescriptionForm(
|
|
||||||
box: model
|
|
||||||
.prescriptionList[0].entityList[index].quantity,
|
|
||||||
uom: model.prescriptionList[0].entityList[index].uom,
|
|
||||||
drugNameGeneric: model.prescriptionList[0]
|
|
||||||
.entityList[index].medicationName,
|
|
||||||
doseUnit: model.prescriptionList[0].entityList[index]
|
|
||||||
.doseDailyUnitID
|
|
||||||
.toString(),
|
|
||||||
doseStreangth: model.prescriptionList[0]
|
|
||||||
.entityList[index].doseDailyQuantity
|
|
||||||
.toString(),
|
|
||||||
duration: model.prescriptionList[0].entityList[index]
|
|
||||||
.doseDurationDays
|
|
||||||
.toString(),
|
|
||||||
startDate: model
|
|
||||||
.prescriptionList[0].entityList[index].startDate
|
|
||||||
.toString(),
|
|
||||||
dose: model.prescriptionList[0].entityList[index].doseTimingID
|
|
||||||
.toString(),
|
|
||||||
frequency: model
|
|
||||||
.prescriptionList[0].entityList[index].frequencyID
|
|
||||||
.toString(),
|
|
||||||
rouat: model.prescriptionList[0].entityList[index].routeID
|
|
||||||
.toString(),
|
|
||||||
patient: patient,
|
|
||||||
drugId: model.prescriptionList[0].entityList[index].medicineCode,
|
|
||||||
drugName: model.prescriptionList[0].entityList[index].medicationName,
|
|
||||||
remarks: model.prescriptionList[0].entityList[index].remarks,
|
|
||||||
model: model,
|
|
||||||
enteredRemarks: model.prescriptionList[0].entityList[index].remarks,
|
|
||||||
context: context);
|
|
||||||
//model.postPrescription();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Divider(
|
|
||||||
height: 0,
|
|
||||||
thickness: 1.0,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
addPrescriptionForm(context, model, patient, model.prescriptionList);
|
|
||||||
//model.postPrescription();
|
|
||||||
},
|
|
||||||
child: CircleAvatar(
|
|
||||||
radius: 65,
|
|
||||||
backgroundColor: Color(0XFFB8382C),
|
|
||||||
child: CircleAvatar(
|
|
||||||
radius: 60,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
child: Icon(
|
|
||||||
Icons.add,
|
|
||||||
color: Colors.black,
|
|
||||||
size: 45.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 15.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context).noPrescriptionListed,
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.w900,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context).addNow,
|
|
||||||
color: Color(0XFFB8382C),
|
|
||||||
fontWeight: FontWeight.w900,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
selectDate(BuildContext context, PrescriptionViewModel model) async {
|
|
||||||
DateTime selectedDate;
|
|
||||||
selectedDate = DateTime.now();
|
|
||||||
final DateTime picked = await showDatePicker(
|
|
||||||
context: context,
|
|
||||||
initialDate: selectedDate,
|
|
||||||
firstDate: DateTime.now().add(Duration(hours: 2)),
|
|
||||||
lastDate: DateTime(2040),
|
|
||||||
initialEntryMode: DatePickerEntryMode.calendar,
|
|
||||||
);
|
|
||||||
if (picked != null && picked != selectedDate) {
|
|
||||||
setState(() {
|
|
||||||
selectedDate = picked;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,516 +0,0 @@
|
|||||||
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.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/date-utils.dart';
|
|
||||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.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:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class NewPrescriptionHistoryScreen extends StatefulWidget {
|
|
||||||
@override
|
|
||||||
_NewPrescriptionHistoryScreenState createState() =>
|
|
||||||
_NewPrescriptionHistoryScreenState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _NewPrescriptionHistoryScreenState
|
|
||||||
extends State<NewPrescriptionHistoryScreen> {
|
|
||||||
PersistentBottomSheetController _controller;
|
|
||||||
final _scaffoldKey = GlobalKey<ScaffoldState>();
|
|
||||||
TextEditingController strengthController = TextEditingController();
|
|
||||||
int testNum = 0;
|
|
||||||
int strengthChar;
|
|
||||||
PatiantInformtion patient;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final screenSize = MediaQuery.of(context).size;
|
|
||||||
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
||||||
patient = routeArgs['patient'];
|
|
||||||
return BaseView<PrescriptionViewModel>(
|
|
||||||
onModelReady: (model) => model.getPrescription(mrn: patient.patientId),
|
|
||||||
builder:
|
|
||||||
(BuildContext context, PrescriptionViewModel model, Widget child) =>
|
|
||||||
AppScaffold(
|
|
||||||
isShowAppBar: true,
|
|
||||||
appBarTitle: TranslationBase.of(context).prescription,
|
|
||||||
body: NetworkBaseView(
|
|
||||||
baseViewModel: model,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Container(
|
|
||||||
color: Colors.white,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
PatientPageHeaderWidget(patient),
|
|
||||||
Divider(
|
|
||||||
height: 1.0,
|
|
||||||
thickness: 1.0,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
(model.prescriptionList.length != 0)
|
|
||||||
? SizedBox(
|
|
||||||
height:
|
|
||||||
model.prescriptionList[0].rowcount == 0
|
|
||||||
? 200.0
|
|
||||||
: 10.0)
|
|
||||||
: SizedBox(height: 200.0),
|
|
||||||
//model.prescriptionList == null
|
|
||||||
(model.prescriptionList.length != 0)
|
|
||||||
? model.prescriptionList[0].rowcount == 0
|
|
||||||
? Container(
|
|
||||||
child: AppText(
|
|
||||||
'Sorry , Theres no prescriptions for this patient',
|
|
||||||
color: Color(0xFFB9382C),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Padding(
|
|
||||||
padding: EdgeInsets.all(14.0),
|
|
||||||
child: NetworkBaseView(
|
|
||||||
baseViewModel: model,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
...List.generate(
|
|
||||||
model.prescriptionList[0]
|
|
||||||
.rowcount,
|
|
||||||
(index) => Container(
|
|
||||||
color: Colors.white,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: MediaQuery.of(
|
|
||||||
context)
|
|
||||||
.size
|
|
||||||
.height *
|
|
||||||
0.022,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment
|
|
||||||
.spaceBetween,
|
|
||||||
// crossAxisAlignment:
|
|
||||||
// CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
height: MediaQuery.of(
|
|
||||||
context)
|
|
||||||
.size
|
|
||||||
.height *
|
|
||||||
0.21,
|
|
||||||
width: MediaQuery.of(
|
|
||||||
context)
|
|
||||||
.size
|
|
||||||
.width *
|
|
||||||
0.1,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
(DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) !=
|
|
||||||
null
|
|
||||||
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn).year)
|
|
||||||
.toString()
|
|
||||||
: DateTime.now()
|
|
||||||
.year)
|
|
||||||
.toString(),
|
|
||||||
color: Colors
|
|
||||||
.green,
|
|
||||||
fontSize:
|
|
||||||
13.5,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
AppDateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn !=
|
|
||||||
null
|
|
||||||
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn)
|
|
||||||
.month)
|
|
||||||
: DateTime.now()
|
|
||||||
.month)
|
|
||||||
.toUpperCase(),
|
|
||||||
color: Colors
|
|
||||||
.green,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
DateTime.parse(model
|
|
||||||
.prescriptionList[
|
|
||||||
0]
|
|
||||||
.entityList[
|
|
||||||
index]
|
|
||||||
.createdOn)
|
|
||||||
.day
|
|
||||||
.toString(),
|
|
||||||
color: Colors
|
|
||||||
.green,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
AppDateUtils.getTimeFormated(DateTime.parse(model
|
|
||||||
.prescriptionList[
|
|
||||||
0]
|
|
||||||
.entityList[
|
|
||||||
index]
|
|
||||||
.createdOn))
|
|
||||||
.toString(),
|
|
||||||
color: Colors
|
|
||||||
.green,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
// height: MediaQuery.of(
|
|
||||||
// context)
|
|
||||||
// .size
|
|
||||||
// .height *
|
|
||||||
// 0.3499,
|
|
||||||
width: MediaQuery.of(
|
|
||||||
context)
|
|
||||||
.size
|
|
||||||
.width *
|
|
||||||
0.77,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'Start Date:',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w700,
|
|
||||||
fontSize:
|
|
||||||
14.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
AppText(
|
|
||||||
AppDateUtils.getDateFormatted(DateTime.parse(model
|
|
||||||
.prescriptionList[0]
|
|
||||||
.entityList[index]
|
|
||||||
.startDate)),
|
|
||||||
fontSize:
|
|
||||||
13.5,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width:
|
|
||||||
6.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
'Order Type:',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w700,
|
|
||||||
fontSize:
|
|
||||||
14.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
AppText(
|
|
||||||
model
|
|
||||||
.prescriptionList[0]
|
|
||||||
.entityList[index]
|
|
||||||
.orderTypeDescription,
|
|
||||||
fontSize:
|
|
||||||
13.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.5,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
child:
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
AppText(
|
|
||||||
model
|
|
||||||
.prescriptionList[0]
|
|
||||||
.entityList[index]
|
|
||||||
.medicationName,
|
|
||||||
fontWeight:
|
|
||||||
FontWeight.w700,
|
|
||||||
fontSize:
|
|
||||||
15.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.5,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
AppText(
|
|
||||||
model
|
|
||||||
.prescriptionList[0]
|
|
||||||
.entityList[index]
|
|
||||||
.doseDetail,
|
|
||||||
fontSize:
|
|
||||||
15.0,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'Indication: ',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w700,
|
|
||||||
fontSize:
|
|
||||||
17.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
RichText(
|
|
||||||
maxLines:
|
|
||||||
3,
|
|
||||||
overflow:
|
|
||||||
TextOverflow.ellipsis,
|
|
||||||
strutStyle:
|
|
||||||
StrutStyle(fontSize: 12.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index].indication),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'UOM: ',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w700,
|
|
||||||
fontSize:
|
|
||||||
17.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
RichText(
|
|
||||||
maxLines:
|
|
||||||
3,
|
|
||||||
overflow:
|
|
||||||
TextOverflow.ellipsis,
|
|
||||||
strutStyle:
|
|
||||||
StrutStyle(fontSize: 12.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index].uom),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'BOX Quantity: ',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w700,
|
|
||||||
fontSize:
|
|
||||||
17.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
RichText(
|
|
||||||
maxLines:
|
|
||||||
3,
|
|
||||||
overflow:
|
|
||||||
TextOverflow.ellipsis,
|
|
||||||
strutStyle:
|
|
||||||
StrutStyle(fontSize: 12.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index].quantity.toString() == null ? "" : model.prescriptionList[0].entityList[index].quantity.toString()),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'pharmacy Intervention ',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w700,
|
|
||||||
fontSize:
|
|
||||||
17.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
RichText(
|
|
||||||
maxLines:
|
|
||||||
3,
|
|
||||||
overflow:
|
|
||||||
TextOverflow.ellipsis,
|
|
||||||
strutStyle:
|
|
||||||
StrutStyle(fontSize: 12.0),
|
|
||||||
text: TextSpan(
|
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index].pharmacyInervention == null ? "" : model.prescriptionList[0].entityList[index].pharmacyInervention.toString()),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height:
|
|
||||||
5.0),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'pharmacist Remarks : ',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w700,
|
|
||||||
fontSize:
|
|
||||||
15.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
// commening below code because there is an error coming in the model please fix it before pushing it
|
|
||||||
model.prescriptionList[0].entityList[index].pharmacistRemarks == null ? "" : model.prescriptionList[0].entityList[index].pharmacistRemarks,
|
|
||||||
fontSize: 15.0),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context)
|
|
||||||
.doctorName +
|
|
||||||
": ",
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w600,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
AppText(
|
|
||||||
model
|
|
||||||
.prescriptionList[0]
|
|
||||||
.entityList[index]
|
|
||||||
.doctorName,
|
|
||||||
fontWeight:
|
|
||||||
FontWeight.w700,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 8.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
'Doctor Remarks : ',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight
|
|
||||||
.w700,
|
|
||||||
fontSize:
|
|
||||||
13.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child:
|
|
||||||
Container(
|
|
||||||
// height: MediaQuery.of(context).size.height *
|
|
||||||
// 0.038,
|
|
||||||
child:
|
|
||||||
RichText(
|
|
||||||
// maxLines:
|
|
||||||
// 2,
|
|
||||||
// overflow:
|
|
||||||
// TextOverflow.ellipsis,
|
|
||||||
strutStyle:
|
|
||||||
StrutStyle(fontSize: 10.0),
|
|
||||||
text:
|
|
||||||
TextSpan(
|
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.black),
|
|
||||||
text: model.prescriptionList[0].entityList[index].remarks != null
|
|
||||||
? model.prescriptionList[0].entityList[index].remarks
|
|
||||||
: "",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.0,
|
|
||||||
),
|
|
||||||
|
|
||||||
// SizedBox(
|
|
||||||
// height: 40,
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Divider(
|
|
||||||
height: 0,
|
|
||||||
thickness: 1.0,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Container(
|
|
||||||
child: AppText(
|
|
||||||
'Sorry , theres no prescriptions listed for this patient',
|
|
||||||
color: Color(0xFFB9382C),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
selectDate(BuildContext context, PrescriptionViewModel model) async {
|
|
||||||
DateTime selectedDate;
|
|
||||||
selectedDate = DateTime.now();
|
|
||||||
final DateTime picked = await showDatePicker(
|
|
||||||
context: context,
|
|
||||||
initialDate: selectedDate,
|
|
||||||
firstDate: DateTime.now().add(Duration(hours: 2)),
|
|
||||||
lastDate: DateTime(2040),
|
|
||||||
initialEntryMode: DatePickerEntryMode.calendar,
|
|
||||||
);
|
|
||||||
if (picked != null && picked != selectedDate) {
|
|
||||||
setState(() {
|
|
||||||
selectedDate = picked;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue