merge-requests/555/head
Sultan Khan 5 years ago
commit dad5aeb262

@ -88,7 +88,8 @@ class BaseAppClient {
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
var asd = json.encode(body);
var asd2;
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(url, final response = await http.post(url,
body: json.encode(body), body: json.encode(body),

@ -13,21 +13,21 @@ class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List(); List<PatientLabOrders> patientLabOrdersList = List();
Future getPatientLabOrdersList( Future getPatientLabOrdersList(
PatiantInformtion patient, bool isArrived) async { PatiantInformtion patient, bool isInpatient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
String url = ""; String url = "";
if (isArrived) { if (isInpatient) {
url = GET_PATIENT_LAB_OREDERS;
} else {
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
url = GET_Patient_LAB_ORDERS; url = GET_Patient_LAB_ORDERS;
} else {
url = GET_PATIENT_LAB_OREDERS;
} }
await baseAppClient.postPatient(url, patient: patient, await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear(); patientLabOrdersList.clear();
if (isArrived) { if (!isInpatient) {
response['ListPLO'].forEach((hospital) { response['ListPLO'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
}); });

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

@ -47,11 +47,11 @@ class VitalSignsViewModel extends BaseViewModel {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
if(isInPatient){ // if(isInPatient){
await _vitalSignService.getInPatientVitalSignHistory(patient); await _vitalSignService.getInPatientVitalSignHistory(patient);
}else { // }else {
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to); // await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
} // }
if (_vitalSignService.hasError) { if (_vitalSignService.hasError) {
error = _vitalSignService.error; error = _vitalSignService.error;

@ -137,11 +137,12 @@ class ProcedureViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
//await getProcedure(mrn: mrn); //await getProcedure(mrn: mrn);
} }
void getPatientRadOrders(PatiantInformtion patient,{String patientType}) async { void getPatientRadOrders(PatiantInformtion patient,{String patientType, bool isInPatient = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient); await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient);
if (_radiologyService.hasError) { if (_radiologyService.hasError) {
error = _radiologyService.error; error = _radiologyService.error;
if(patientType=="7") if(patientType=="7")
@ -226,14 +227,11 @@ class ProcedureViewModel extends BaseViewModel {
return labResultLists; return labResultLists;
} }
void getLabs(PatiantInformtion patient,{bool isArrived}) async { void getLabs(PatiantInformtion patient, {bool isInpatient = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList(patient, isArrived); await _labsService.getPatientLabOrdersList(patient, isInpatient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
if(isArrived)
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_labsService.patientLabOrdersList.forEach((element) { _labsService.patientLabOrdersList.forEach((element) {

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

@ -176,7 +176,7 @@ class PatiantInformtion {
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'], appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'], appointmentType: json['appointmentType'],
appointmentTypeId: json['appointmentTypeId']?? json['appointmentTypeid'], appointmentTypeId: json['appointmentTypeId']?? json['appointmentTypeid'],
arrivedOn: json['arrivedOn'], arrivedOn: json['arrivedOn'] ?? json['ArrivedOn'],
clinicGroupId: json['clinicGroupId'], clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'], companyName: json['companyName'],
dischargeStatus: json['dischargeStatus'], dischargeStatus: json['dischargeStatus'],

@ -540,7 +540,8 @@ class _HomeScreenState extends State<HomeScreen> {
"patientSearchForm": "patientSearchForm":
_patientSearchFormValues, _patientSearchFormValues,
"selectedType": "0", "selectedType": "0",
"arrivalType": "1" "arrivalType": "1",
"isInpatient": false
}); });
}, },
), ),

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

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

@ -653,8 +653,11 @@ class _PatientsScreenState extends State<PatientsScreen> {
.getTo, .getTo,
"isSearch": "isSearch":
isSearch, isSearch,
"isInpatient":
isInpatient,
"arrivalType": "arrivalType":
arrivalType, arrivalType,
"isInpatient":isInpatient
}); });
}, },
); );

@ -29,9 +29,10 @@ class LabsHomePage extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
patientType = routeArgs['patientType']; patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType']; arrivalType = routeArgs['arrivalType'];
bool isInpatient = routeArgs['isInpatient'];
print(arrivalType); print(arrivalType);
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getLabs(patient,isArrived: ( patient.patientStatusType == 43)), onModelReady: (model) => model.getLabs(patient, isInpatient: isInpatient),
builder: (context, ProcedureViewModel model, widget) => AppScaffold( builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
@ -68,7 +69,7 @@ class LabsHomePage extends StatelessWidget {
], ],
), ),
), ),
if(patient.patientStatusType == 43) if ( patient.patientStatusType!=null && patient.patientStatusType == 43)
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
@ -88,7 +89,7 @@ class LabsHomePage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43) if ( patient.patientStatusType!=null && patient.patientStatusType == 43)
AddNewOrder( onTap: () { AddNewOrder( onTap: () {
Navigator.push( Navigator.push(
context, context,

@ -26,6 +26,7 @@ import '../../../routes.dart';
class PatientProfileScreen extends StatelessWidget { class PatientProfileScreen extends StatelessWidget {
PatiantInformtion patient; PatiantInformtion patient;
bool isFromSearch = false; bool isFromSearch = false;
bool isInpatient = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -40,51 +41,11 @@ class PatientProfileScreen extends StatelessWidget {
if (routeArgs.containsKey("isSearch")) { if (routeArgs.containsKey("isSearch")) {
isFromSearch = routeArgs['isSearch']; isFromSearch = routeArgs['isSearch'];
} }
if (routeArgs.containsKey("isInpatient")) {
isInpatient = routeArgs['isInpatient'];
}
return BaseView<PatientViewModel>( 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( builder: (_, patientViewModel, w) => AppScaffold(
baseViewModel: patientViewModel, baseViewModel: patientViewModel,
appBarTitle: TranslationBase.of(context).patientProfile, appBarTitle: TranslationBase.of(context).patientProfile,
@ -108,21 +69,23 @@ class PatientProfileScreen extends StatelessWidget {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
isFromSearch isInpatient
? ProfileMedicalInfoWidgetSearch( ? ProfileMedicalInfoWidgetInPatient(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
isInpatient:isInpatient,
) )
: patientType == "1" : isFromSearch
? ProfileMedicalInfoWidgetInPatient( ? ProfileMedicalInfoWidgetSearch(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
isInpatient:false
) )
: ProfileMedicalInfoWidget( : ProfileMedicalInfoWidget(
patient: patient, patient: patient,
@ -130,6 +93,7 @@ class PatientProfileScreen extends StatelessWidget {
arrivalType: arrivalType, arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
isInpatient:isInpatient
), ),
], ],
), ),
@ -139,7 +103,8 @@ class PatientProfileScreen extends StatelessWidget {
], ],
), ),
), ),
if (patient.patientStatusType !=null && patient.patientStatusType == 43 ) if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
BaseView<SOAPViewModel>( BaseView<SOAPViewModel>(
onModelReady: (model) async {}, onModelReady: (model) async {},
builder: (_, model, w) => Positioned( builder: (_, model, w) => Positioned(

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

@ -30,12 +30,13 @@ class VitalSignDetailsScreen extends StatelessWidget {
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
String from = routeArgs['from']; String from = routeArgs['from'];
String to = routeArgs['to']; String to = routeArgs['to'];
bool isInpatient = routeArgs['isInpatient'];
String imageBasePath = 'assets/images/'; String imageBasePath = 'assets/images/';
String assetBasePath = "${imageBasePath}patient/vital_signs/"; String assetBasePath = "${imageBasePath}patient/vital_signs/";
return BaseView<VitalSignsViewModel>( return BaseView<VitalSignsViewModel>(
onModelReady: (model) => onModelReady: (model) =>
model.getPatientVitalSignHistory(patient, from, to, patientType == "1"), model.getPatientVitalSignHistory(patient, from, to, isInpatient),
builder: (_, mode, widget) => AppScaffold( builder: (_, mode, widget) => AppScaffold(
baseViewModel: mode, baseViewModel: mode,
isShowAppBar: true, isShowAppBar: true,

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

@ -246,11 +246,18 @@ class PatientReferralItemWidget extends StatelessWidget {
child: Container( child: Container(
width: 40, width: 40,
height: 40, height: 40,
child: CircleAvatar( child: doctorAvatar !=null?ClipRRect(
radius: 25.0, borderRadius: BorderRadius.circular(20.0),
backgroundImage: NetworkImage(doctorAvatar), child: Image.network(
backgroundColor: Colors.transparent, doctorAvatar,
), height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('No Image');
},
)):Container(),
), ),
), ),
Expanded( Expanded(

@ -13,6 +13,7 @@ class PatientProfileButton extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
String arrivalType; String arrivalType;
final bool isInPatient;
String from; String from;
String to; String to;
final String url = "assets/images/"; final String url = "assets/images/";
@ -33,7 +34,9 @@ class PatientProfileButton extends StatelessWidget {
this.onTap, this.onTap,
this.isLoading = false, this.isLoading = false,
this.from, this.from,
this.to}) this.to,
this.isInPatient = false,
})
: super(key: key); : super(key: key);
@override @override
@ -127,7 +130,8 @@ class PatientProfileButton extends StatelessWidget {
'from': from, 'from': from,
'to': to, 'to': to,
'patientType': patientType, 'patientType': patientType,
'arrivalType': arrivalType 'arrivalType': arrivalType,
'isInpatient': isInPatient,
}); });
} }
} }

@ -22,6 +22,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
final bool isInpatient;
ProfileMedicalInfoWidget( ProfileMedicalInfoWidget(
{Key key, {Key key,
@ -29,7 +30,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
this.patientType, this.patientType,
this.arrivalType, this.arrivalType,
this.from, this.from,
this.to}); this.to, this.isInpatient});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -43,7 +44,6 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
childAspectRatio: 1 / 1.0, childAspectRatio: 1 / 1.0,
crossAxisCount: 3, crossAxisCount: 3,
children: [ children: [
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -55,7 +55,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: TranslationBase.of(context).signs, nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS, route: VITAL_SIGN_DETAILS,
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),
if (selectedPatientType != 7) // if (selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -80,6 +80,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
isInPatient:isInpatient,
route: RADIOLOGY_PATIENT, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
@ -102,7 +103,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'), icon: 'patient/order_prescription.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -112,7 +113,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures, nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'), icon: 'patient/Order_Procedures.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) //if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -122,7 +123,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) // if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -132,7 +133,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).patientSick, nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave, nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'), icon: 'patient/patient_sick_leave.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (patient.appointmentNo!=null && patient.appointmentNo!=0)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -143,7 +144,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf, nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png'), icon: 'patient/ucaf.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (patient.appointmentNo!=null && patient.appointmentNo!=0)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -154,7 +155,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).referral, nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'), icon: 'patient/refer_patient.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (patient.appointmentNo!=null && patient.appointmentNo!=0)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -165,7 +166,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).admission, nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request, nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'), icon: 'patient/admission_req.png'),
if (patientType == "1") if (isInpatient)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -175,7 +176,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
if (patientType == "1") if (isInpatient)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -22,6 +22,9 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
final bool isInpatient;
ProfileMedicalInfoWidgetInPatient( ProfileMedicalInfoWidgetInPatient(
{Key key, {Key key,
@ -29,7 +32,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
this.patientType, this.patientType,
this.arrivalType, this.arrivalType,
this.from, this.from,
this.to}); this.to, this.isInpatient});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -53,6 +56,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs, nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS, route: VITAL_SIGN_DETAILS,
isInPatient: true,
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -60,6 +64,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: LAB_RESULT, route: LAB_RESULT,
isInPatient: true,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'), icon: 'patient/lab_results.png'),
@ -68,6 +73,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
@ -96,8 +102,8 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: ORDER_NOTE, route: ORDER_NOTE,
nameLine1:"Order", //"Text", nameLine1: "Order", //"Text",
nameLine2: "Sheet",//TranslationBase.of(context).orders, nameLine2: "Sheet", //TranslationBase.of(context).orders,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -126,9 +132,9 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
arrivalType: arrivalType, arrivalType: arrivalType,
isDisable: true, isDisable: true,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Medical",//Health nameLine1: "Medical", //Health
//TranslationBase.of(context).medicalReport, //TranslationBase.of(context).medicalReport,
nameLine2: "Report",//Report nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport, //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
@ -137,6 +143,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: REFER_IN_PATIENT_TO_DOCTOR, route: REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
nameLine1: TranslationBase.of(context).referral, nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'), icon: 'patient/refer_patient.png'),

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

@ -110,7 +110,7 @@ class DoctorCard extends StatelessWidget {
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).orderNo + TranslationBase.of(context).orderNo +
": ", " ",
color: Colors.grey[500], color: Colors.grey[500],
fontSize: 14, fontSize: 14,
), ),
@ -126,7 +126,7 @@ class DoctorCard extends StatelessWidget {
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.invoiceNo + .invoiceNo +
": ", " ",
fontSize: 14, fontSize: 14,
color: Colors.grey[500], color: Colors.grey[500],
), ),

Loading…
Cancel
Save