Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into pagination_doctor_repay

merge-requests/805/head
Elham Rababh 5 years ago
commit 7e552cccd4

@ -26,7 +26,8 @@ class BaseAppClient {
Function(dynamic response, int statusCode) onSuccess, Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure, Function(String error, int statusCode) onFailure,
bool isAllowAny = false, bool isAllowAny = false,
bool isLiveCare = false}) async { bool isLiveCare = false,
bool isFallLanguage=false}) async {
String url; String url;
if (isLiveCare) if (isLiveCare)
url = BASE_URL_LIVE_CARE + endPoint; url = BASE_URL_LIVE_CARE + endPoint;
@ -58,12 +59,13 @@ class BaseAppClient {
body['TokenID'] = token ?? ''; body['TokenID'] = token ?? '';
} }
// body['TokenID'] = "@dm!n" ?? ''; // body['TokenID'] = "@dm!n" ?? '';
String lang = await sharedPref.getString(APP_Language); if(!isFallLanguage) {
if (lang != null && lang == 'ar') String lang = await sharedPref.getString(APP_Language);
body['LanguageID'] = 1; if (lang != null && lang == 'ar')
else body['LanguageID'] = 1;
body['LanguageID'] = 2; else
body['LanguageID'] = 2;
}
body['stamp'] = DateTime.now().toIso8601String(); body['stamp'] = DateTime.now().toIso8601String();
// if(!body.containsKey("IPAdress")) // if(!body.containsKey("IPAdress"))
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
@ -125,6 +125,7 @@ const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLab
const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION = 'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription';
// SOAP // SOAP

File diff suppressed because it is too large Load Diff

@ -0,0 +1,108 @@
class LabResultHistory {
String description;
String femaleInterpretativeData;
int gender;
bool isCertificateAllowed;
int lineItemNo;
String maleInterpretativeData;
String notes;
int orderLineItemNo;
int orderNo;
String packageID;
int patientID;
String projectID;
String referanceRange;
String resultValue;
int resultValueBasedLineItemNo;
String resultValueFlag;
String sampleCollectedOn;
String sampleReceivedOn;
String setupID;
String superVerifiedOn;
String testCode;
String uOM;
String verifiedOn;
String verifiedOnDateTime;
LabResultHistory(
{this.description,
this.femaleInterpretativeData,
this.gender,
this.isCertificateAllowed,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.orderLineItemNo,
this.orderNo,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.resultValueBasedLineItemNo,
this.resultValueFlag,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
LabResultHistory.fromJson(Map<String, dynamic> json) {
description = json['Description'];
femaleInterpretativeData = json['FemaleInterpretativeData'];
gender = json['Gender'];
isCertificateAllowed = json['IsCertificateAllowed'];
lineItemNo = json['LineItemNo'];
maleInterpretativeData = json['MaleInterpretativeData'];
notes = json['Notes'];
orderLineItemNo = json['OrderLineItemNo'];
orderNo = json['OrderNo'];
packageID = json['PackageID'];
patientID = json['PatientID'];
projectID = json['ProjectID'];
referanceRange = json['ReferanceRange'];
resultValue = json['ResultValue'];
resultValueBasedLineItemNo = json['ResultValueBasedLineItemNo'];
resultValueFlag = json['ResultValueFlag'];
sampleCollectedOn = json['SampleCollectedOn'];
sampleReceivedOn = json['SampleReceivedOn'];
setupID = json['SetupID'];
superVerifiedOn = json['SuperVerifiedOn'];
testCode = json['TestCode'];
uOM = json['UOM'];
verifiedOn = json['VerifiedOn'];
verifiedOnDateTime = json['VerifiedOnDateTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Description'] = this.description;
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
data['Gender'] = this.gender;
data['IsCertificateAllowed'] = this.isCertificateAllowed;
data['LineItemNo'] = this.lineItemNo;
data['MaleInterpretativeData'] = this.maleInterpretativeData;
data['Notes'] = this.notes;
data['OrderLineItemNo'] = this.orderLineItemNo;
data['OrderNo'] = this.orderNo;
data['PackageID'] = this.packageID;
data['PatientID'] = this.patientID;
data['ProjectID'] = this.projectID;
data['ReferanceRange'] = this.referanceRange;
data['ResultValue'] = this.resultValue;
data['ResultValueBasedLineItemNo'] = this.resultValueBasedLineItemNo;
data['ResultValueFlag'] = this.resultValueFlag;
data['SampleCollectedOn'] = this.sampleCollectedOn;
data['SampleReceivedOn'] = this.sampleReceivedOn;
data['SetupID'] = this.setupID;
data['SuperVerifiedOn'] = this.superVerifiedOn;
data['TestCode'] = this.testCode;
data['UOM'] = this.uOM;
data['VerifiedOn'] = this.verifiedOn;
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
return data;
}
}

@ -21,6 +21,6 @@ class ScheduleService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestSchedule.toJson(),); }, body: _requestSchedule.toJson(),isFallLanguage: true);
} }
} }

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/core/model/labs/LabResultHistory.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart';
@ -52,6 +53,7 @@ class LabsService extends BaseService {
List<PatientLabSpecialResult> patientLabSpecialResult = List(); List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List(); List<LabResult> labResultList = List();
List<LabOrderResult> labOrdersResultsList = List(); List<LabOrderResult> labOrdersResultsList = List();
List<LabResultHistory> labOrdersResultHistoryList = List();
Future getLaboratoryResult( Future getLaboratoryResult(
{String projectID, {String projectID,
@ -113,7 +115,8 @@ class LabsService extends BaseService {
labResultList.add(LabResult.fromJson(hospital)); labResultList.add(LabResult.fromJson(hospital));
}); });
response['List_GetLabSpecial'].forEach((hospital) { response['List_GetLabSpecial'].forEach((hospital) {
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); patientLabSpecialResult
.add(PatientLabSpecialResult.fromJson(hospital));
}); });
} else { } else {
response['ListPLR'].forEach((lab) { response['ListPLR'].forEach((lab) {
@ -179,4 +182,30 @@ class LabsService extends BaseService {
// super.error = error; // super.error = error;
// }, body: _requestSendLabReportEmail.toJson()); // }, body: _requestSendLabReportEmail.toJson());
} }
Future getPatientLabOrdersResultHistoryByDescription(
{PatientLabOrders patientLabOrder,
String procedureDescription,
PatiantInformtion patient}) async {
hasError = false;
Map<String, dynamic> body = Map();
if (patientLabOrder != null) {
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = 0;
body['ClinicID'] = 0;
}
body['isDentalAllowedBackend'] = false;
body['ProcedureDescription'] = procedureDescription;
await baseAppClient.postPatient(
GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION,
patient: patient, onSuccess: (dynamic response, int statusCode) {
labOrdersResultHistoryList.clear();
response['ListGeneralResultHistory'].forEach((lab) {
labOrdersResultHistoryList.add(LabResultHistory.fromJson(lab));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
} }

@ -142,7 +142,7 @@ class AuthenticationViewModel extends BaseViewModel {
iMEI: user.iMEI, iMEI: user.iMEI,
facilityId: user.projectID, facilityId: user.projectID,
memberID: user.doctorID, memberID: user.doctorID,
loginDoctorID: user.doctorID, loginDoctorID: int.parse(user.editedBy.toString()),
zipCode: user.outSA == true ? '971' : '966', zipCode: user.outSA == true ? '971' : '966',
mobileNumber: user.mobile, mobileNumber: user.mobile,
oTPSendType: authMethodType.getTypeIdService(), oTPSendType: authMethodType.getTypeIdService(),
@ -172,7 +172,7 @@ class AuthenticationViewModel extends BaseViewModel {
error = _authService.error; error = _authService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await sharedPref.setString(LOGIN_TOKEN_ID, await sharedPref.setString(TOKEN,
_authService.activationCodeForDoctorAppRes.logInTokenID); _authService.activationCodeForDoctorAppRes.logInTokenID);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
@ -191,14 +191,14 @@ class AuthenticationViewModel extends BaseViewModel {
projectID: await sharedPref.getInt(PROJECT_ID) != null projectID: await sharedPref.getInt(PROJECT_ID) != null
? await sharedPref.getInt(PROJECT_ID) ? await sharedPref.getInt(PROJECT_ID)
: user.projectID, : user.projectID,
logInTokenID: await sharedPref.getString(LOGIN_TOKEN_ID), logInTokenID: await sharedPref.getString(TOKEN),
activationCode: activationCode ?? '0000', activationCode: activationCode ?? '0000',
memberID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID , memberID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID ,
password: userInfo.password, password: userInfo.password,
facilityId:userInfo.projectID!=null? userInfo.projectID.toString():user.projectID.toString(), facilityId:userInfo.projectID!=null? userInfo.projectID.toString():user.projectID.toString(),
oTPSendType: await sharedPref.getInt(OTP_TYPE), oTPSendType: await sharedPref.getInt(OTP_TYPE),
iMEI: localToken, iMEI: localToken,
loginDoctorID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID,// loggedUser.listMemberInformation[0].employeeID, loginDoctorID:userInfo.userID!=null? int.parse(userInfo.userID):user.editedBy,// loggedUser.listMemberInformation[0].employeeID,
isForSilentLogin:isSilentLogin, isForSilentLogin:isSilentLogin,
generalid: "Cs2020@2016\$2958"); generalid: "Cs2020@2016\$2958");
await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp); await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp);
@ -258,7 +258,7 @@ class AuthenticationViewModel extends BaseViewModel {
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, await sharedPref.setString(VIDA_REFRESH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID); sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID);
await sharedPref.setString(LOGIN_TOKEN_ID, await sharedPref.setString(TOKEN,
sendActivationCodeForDoctorAppResponseModel.authenticationTokenID); sendActivationCodeForDoctorAppResponseModel.authenticationTokenID);
} }

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/core/model/labs/LabResultHistory.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart';
@ -26,6 +27,8 @@ class LabsViewModel extends BaseViewModel {
? _patientLabOrdersListClinic ? _patientLabOrdersListClinic
: _patientLabOrdersListHospital; : _patientLabOrdersListHospital;
List<LabResultHistory> get labOrdersResultHistoryList => _labsService.labOrdersResultHistoryList;
void getLabs(PatiantInformtion patient) async { void getLabs(PatiantInformtion patient) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList(patient, true); await _labsService.getPatientLabOrdersList(patient, true);
@ -132,7 +135,7 @@ class LabsViewModel extends BaseViewModel {
} }
} }
void setLabResultDependOnFilterName(){ void setLabResultDependOnFilterName() {
_labsService.labResultList.forEach((element) { _labsService.labResultList.forEach((element) {
List<LabResultList> patientLabOrdersClinic = labResultLists List<LabResultList> patientLabOrdersClinic = labResultLists
.where( .where(
@ -176,6 +179,23 @@ class LabsViewModel extends BaseViewModel {
} }
} }
getPatientLabResultHistoryByDescription(
{PatientLabOrders patientLabOrder,
String procedureDescription,
PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResultHistoryByDescription(
patientLabOrder: patientLabOrder,
procedureDescription: procedureDescription,
patient: patient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
sendLabReportEmail({PatientLabOrders patientLabOrder, String mes}) async { sendLabReportEmail({PatientLabOrders patientLabOrder, String mes}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder); await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder);
if (_labsService.hasError) { if (_labsService.hasError) {

@ -55,7 +55,7 @@ class RequestSchedule {
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['DoctorWorkingHoursDays'] = this.doctorWorkingHoursDays; data['DoctorWorkingHoursDays'] = this.doctorWorkingHoursDays;
data['LanguageID'] = this.languageID; data['LanguageID'] = 2;
data['stamp'] = this.stamp; data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress; data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID; data['VersionID'] = this.versionID;

@ -455,7 +455,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(authenticationViewModel.error); Helpers.showErrorToast(authenticationViewModel.error);
} else { } else {
await sharedPref.setString(LOGIN_TOKEN_ID, await sharedPref.setString(TOKEN,
authenticationViewModel.activationCodeVerificationScreenRes.logInTokenID); authenticationViewModel.activationCodeVerificationScreenRes.logInTokenID);
if (authMethodType == AuthMethodTypes.SMS || if (authMethodType == AuthMethodTypes.SMS ||
authMethodType == AuthMethodTypes.WhatsApp) { authMethodType == AuthMethodTypes.WhatsApp) {

@ -249,7 +249,7 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen>
TranslationBase.of(context).inPatientAll, TranslationBase.of(context).inPatientAll,
counter: model.inPatientList.length), counter: model.inPatientList.length),
tabWidget( tabWidget(
screenSize, _activeTab == 1, "My InPatients", screenSize, _activeTab == 1, TranslationBase.of(context).inPatient,
counter: model.myIinPatientList.length), counter: model.myIinPatientList.length),
tabWidget(screenSize, _activeTab == 2, tabWidget(screenSize, _activeTab == 2,
TranslationBase.of(context).discharged), TranslationBase.of(context).discharged),

@ -0,0 +1,132 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_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/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/errors/error_message.dart';
import 'package:flutter/material.dart';
class LabResultHistoryPage extends StatelessWidget {
final PatientLabOrders patientLabOrder;
final String filterName;
final PatiantInformtion patient;
LabResultHistoryPage({this.patientLabOrder, this.filterName, this.patient});
@override
Widget build(BuildContext context) {
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResultHistoryByDescription(
patientLabOrder: patientLabOrder,
procedureDescription: filterName,
patient: patient),
builder: (context, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: filterName,
baseViewModel: model,
body: model.labOrdersResultHistoryList.length > 0
? SingleChildScrollView(
child: Column(
children: [
...List.generate(model.labOrdersResultHistoryList.length,
(index) {
return Container(
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context).description,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
model.labOrdersResultHistoryList[index].description,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
),
Row(
children: [
AppText(
"Reference Range",
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
model.labOrdersResultHistoryList[index].referanceRange,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
),
Row(
children: [
AppText(
"Result Value",
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
model.labOrdersResultHistoryList[index].resultValue,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
),
Row(
children: [
AppText(
"Verified On",
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
model.labOrdersResultHistoryList[index].verifiedOn,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
),
],
),
);
}),
],
),
)
: ErrorMessage(
error: "No data",
),
),
);
}
}

@ -10,6 +10,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'LabResultHistoryPage.dart';
class LabResultWidget extends StatelessWidget { class LabResultWidget extends StatelessWidget {
final String filterName; final String filterName;
final List<LabResult> patientLabResultList; final List<LabResult> patientLabResultList;
@ -18,7 +20,12 @@ class LabResultWidget extends StatelessWidget {
final bool isInpatient; final bool isInpatient;
LabResultWidget( LabResultWidget(
{Key key, this.filterName, this.patientLabResultList, this.patientLabOrder, this.patient, this.isInpatient}) {Key key,
this.filterName,
this.patientLabResultList,
this.patientLabOrder,
this.patient,
this.isInpatient})
: super(key: key); : super(key: key);
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@ -35,7 +42,11 @@ class LabResultWidget extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppText(filterName), Row(
children: [
AppText(filterName),
],
),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -108,7 +119,27 @@ class LabResultWidget extends StatelessWidget {
...List.generate( ...List.generate(
patientLabResultList.length, patientLabResultList.length,
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
InkWell(
onTap: (){
Navigator.push(
context,
FadePage(
page: LabResultHistoryPage(
filterName: patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
),
),
);
},
child: AppText(
" (show details)",
color: Colors.blue,
fontSize: 12,
),
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -117,7 +148,8 @@ class LabResultWidget extends StatelessWidget {
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: AppText( child: AppText(
'${patientLabResultList[index].testCode}\n' + patientLabResultList[index].description, '${patientLabResultList[index].testCode}\n' +
patientLabResultList[index].description,
textAlign: TextAlign.center, textAlign: TextAlign.center,
isCopyable: true, isCopyable: true,
), ),
@ -131,7 +163,9 @@ class LabResultWidget extends StatelessWidget {
child: Center( child: Center(
child: AppText( child: AppText(
patientLabResultList[index].resultValue ?? patientLabResultList[index].resultValue ??
"" + " " + "${patientLabResultList[index].uOM ?? ""}", "" +
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center, textAlign: TextAlign.center,
isCopyable: true, isCopyable: true,
), ),

@ -75,6 +75,8 @@ class MedicalReportDetailPage extends StatelessWidget {
), ),
), ),
child: Html( child: Html(
data: medicalReport.reportDataHtml ?? "" data: medicalReport.reportDataHtml ?? ""
), ),
) : Container( ) : Container(

@ -424,7 +424,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
), ),
PrescriptionTextFiled( PrescriptionTextFiled(
width: MediaQuery.of(context).size.width * 0.517, width: MediaQuery.of(context).size.width * 0.517,
element: units, element: model.itemMedicineListUnit.length == 1
? model.itemMedicineListUnit[0]
: units,
elementError: unitError, elementError: unitError,
keyName: 'description', keyName: 'description',
keyId: 'parameterCode', keyId: 'parameterCode',
@ -443,7 +445,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
SizedBox(height: spaceBetweenTextFileds), SizedBox(height: spaceBetweenTextFileds),
PrescriptionTextFiled( PrescriptionTextFiled(
elementList: model.itemMedicineListRoute, elementList: model.itemMedicineListRoute,
element: route, element: model.itemMedicineListRoute.length == 1
? model.itemMedicineListRoute[0]
: route,
elementError: routeError, elementError: routeError,
keyId: 'parameterCode', keyId: 'parameterCode',
keyName: 'description', keyName: 'description',
@ -644,11 +648,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
eventCategory: "Add Prescription Form", eventCategory: "Add Prescription Form",
eventAction: "Add Prescription", eventAction: "Add Prescription",
); );
if (route != null && if (duration != null &&
duration != null &&
doseTime != null && doseTime != null &&
frequency != null && frequency != null &&
units != null &&
selectedDate != null && selectedDate != null &&
strengthController.text != "") { strengthController.text != "") {
if (_selectedMedication.isNarcotic == true) { if (_selectedMedication.isNarcotic == true) {

@ -43,10 +43,10 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
ListSelectDialog dialog = ListSelectDialog( ListSelectDialog dialog = ListSelectDialog(
list: widget.elementList, list: widget.elementList,
attributeName: '${widget.keyName}', attributeName: '${widget.keyName}',
attributeValueId: '${widget.keyId}', attributeValueId:
widget.elementList.length == 1 ? widget.elementList[0]['${widget.keyId}'] : '${widget.keyId}',
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) => okFunction: (selectedValue) => widget.okFunction(selectedValue),
widget.okFunction(selectedValue),
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
@ -65,8 +65,7 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
? widget.element['${widget.keyName}'] ? widget.element['${widget.keyName}']
: null, : null,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: validationError: widget.elementList.length != 1 ? widget.elementError : null,
widget.elementList.length != 1 ? widget.elementError : null,
enabled: false, enabled: false,
), ),
), ),

@ -1371,6 +1371,7 @@ class TranslationBase {
String get summeryReply => localizedValues['summeryReply'][locale.languageCode]; String get summeryReply => localizedValues['summeryReply'][locale.languageCode];
String get severityValidationError => localizedValues['severityValidationError'][locale.languageCode]; String get severityValidationError => localizedValues['severityValidationError'][locale.languageCode];
String get textCopiedSuccessfully => localizedValues['textCopiedSuccessfully'][locale.languageCode]; String get textCopiedSuccessfully => localizedValues['textCopiedSuccessfully'][locale.languageCode];
String get roomNo => localizedValues['roomNo'][locale.languageCode];
String get seeMore => localizedValues['seeMore'][locale.languageCode]; String get seeMore => localizedValues['seeMore'][locale.languageCode];
} }

@ -381,14 +381,37 @@ class PatientCard extends StatelessWidget {
value: value:
"${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}", "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}",
), ),
if (patientInfo.admissionDate != null)
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.roomNo +
" : ",
style: TextStyle(fontSize: 12)),
new TextSpan(
text:
"${patientInfo.roomId}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 13)),
]))),
if (isFromLiveCare) if (isFromLiveCare)
Column( Column(
children: [ children: [
CustomRow(label: TranslationBase.of(context) CustomRow(label: TranslationBase.of(context)
.clinic + .clinic +
" : ",value: patientInfo.clinicName,), " : ",
value: patientInfo.clinicName,),
], ],
), ),
])) ]))

Loading…
Cancel
Save