patient medical info

merge-requests/70/head
unknown 6 years ago
parent 8aaf96a734
commit 35205b7024

@ -6,6 +6,10 @@ const ONLY_DATE = "[0-9/]";
const BASE_URL = 'https://uat.hmgwebservices.com/Services/';
const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems";
const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL = "DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_ORDERS_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient";
//*********change value to decode json from Dropdown ************
var SERVICES_PATIANT = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
var SERVICES_PATIANT2 = ["List_MyOutPatient", "List_MyInPatient","List_MyDischargePatient" ,"List_MyReferredPatient","List_MyDischargeReferralPatient","List_MyTomorrowPatient","List_MyReferralPatient"];

@ -0,0 +1,87 @@
/*
*@author: Ibrahim Albitar
*@Date:15/5/2020
*@param:
{"PatientID":1089227,
"PatientTypeID":1,
"EXuldAPPNO":0,
"ProjectID":12,
"LanguageID":2,
"stamp":"2020-04-01T09:47:19.643Z",
"IPAdress":"11.11.11.11",
"VersionID":1.2,
"Channel":9,
"TokenID":"yIwh6wNyUkOeQlJRohWjyw==",
"SessionID":"LlBk8lUEJY",
"IsLoginForDoctorApp":true,
"PatientOutSA":false}
*@return:
*@desc:
*/
class InsuranceAprovalsRequest {
int exuldAppNO;
int patientID;
int channel;
int projectID;
int languageID;
String stamp;
String ipAdress;
double versionID;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
int patientTypeID;
InsuranceAprovalsRequest(
{
this.exuldAppNO,
this.patientID,
this.channel = 9,
this.projectID = 12,
this.patientTypeID = 1,
this.languageID = 2,
this.stamp = '2020-04-23T21:01:21.492Z',
this.ipAdress = '11.11.11.11',
this.versionID = 1.2,
this.tokenID = '@dm!n',
this.sessionID = 'e29zoooEJ4',
this.isLoginForDoctorApp = true,
this.patientOutSA = false});
InsuranceAprovalsRequest.fromJson(Map<String, dynamic> json) {
exuldAppNO = json['EXuldAPPNO'];
patientID = json['PatientID'];
channel = json['Channel'];
projectID = json['ProjectID'];
patientTypeID = json['PatientTypeID'];
languageID = json['LanguageID'];
stamp = json['stamp'];
ipAdress = json['IPAdress'];
versionID = json['VersionID'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['EXuldAPPNO'] = this.exuldAppNO;
data['PatientID'] = this.patientID;
data['Channel'] = this.channel;
data['ProjectID'] = this.projectID;
data['PatientTypeID'] = this.patientTypeID;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.ipAdress;
data['VersionID'] = this.versionID;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
return data;
}
}

@ -0,0 +1,88 @@
/*
*@author: Ibrahim Albitar
*@Date:15/5/2020
*@param:
{"VisitType":3,
"AdmissionNo":2020004683,
"ProjectID":12,
"LanguageID":2,
"stamp":"2020-04-01T09:53:50.410Z",
"IPAdress":"11.11.11.11",
"VersionID":1.2,
"Channel":9,
"TokenID":"yIwh6wNyUkOeQlJRohWjyw==",
"SessionID":"LlBk8lUEJY",
"IsLoginForDoctorApp":true,
"PatientOutSA":false,
"PatientTypeID":1}
*@return:
*@desc:
*/
class OrdersRequest {
int visitType;
int admissionNo;
int projectID;
int languageID;
String stamp;
String iPAdress;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
int patientTypeID;
double versionID;
OrdersRequest(
{this.visitType ,
this.admissionNo,
this.projectID = 12,
this.stamp = '2020-04-23T21:01:21.492Z',
this.languageID = 2,
this.iPAdress = '11.11.11.11',
this.channel = 9,
this.tokenID = '@dm!n',
this.sessionID = "LlBk8lUEJY",
this.isLoginForDoctorApp = true,
this.patientTypeID = 1,
this.versionID = 1.2,
this.patientOutSA = false});
OrdersRequest.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType'];
admissionNo = json['AdmissionNo'];
projectID = json['ProjectID'];
stamp = json['stamp'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID'];
versionID = json['VersionID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VisitType'] = this.visitType;
data['AdmissionNo'] = this.admissionNo;
data['ProjectID'] = this.projectID;
data['stamp'] = this.stamp;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID;
data['VersionID'] = this.versionID;
return data;
}
}

@ -0,0 +1,88 @@
/*
*@author: Ibrahim Albitar
*@Date:15/5/2020
*@param:
{"VisitType":5,
"AdmissionNo":2020004683,
"ProjectID":12,
"LanguageID":2,
"stamp":"2020-04-01T09:41:59.089Z",
"IPAdress":"11.11.11.11",
"VersionID":1.2,
"Channel":9,
"TokenID":"yIwh6wNyUkOeQlJRohWjyw==",
"SessionID":"LlBk8lUEJY",
"IsLoginForDoctorApp":true,
"PatientOutSA":false,
"PatientTypeID":1}
*@return:
*@desc:
*/
class ProgressNoteRequest {
int visitType;
int admissionNo;
int projectID;
int languageID;
String stamp;
String iPAdress;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
int patientTypeID;
double versionID;
ProgressNoteRequest(
{this.visitType ,
this.admissionNo,
this.projectID = 12,
this.stamp = '2020-04-23T21:01:21.492Z',
this.languageID = 2,
this.iPAdress = '11.11.11.11',
this.channel = 9,
this.tokenID = '@dm!n',
this.sessionID = "LlBk8lUEJY",
this.isLoginForDoctorApp = true,
this.patientTypeID = 1,
this.versionID = 1.2,
this.patientOutSA = false});
ProgressNoteRequest.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType'];
admissionNo = json['AdmissionNo'];
projectID = json['ProjectID'];
stamp = json['stamp'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID'];
versionID = json['VersionID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VisitType'] = this.visitType;
data['AdmissionNo'] = this.admissionNo;
data['ProjectID'] = this.projectID;
data['stamp'] = this.stamp;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID;
data['VersionID'] = this.versionID;
return data;
}
}

@ -1,11 +1,10 @@
import 'dart:convert';
import 'package:doctor_app_flutter/client/app_client.dart';
import 'package:doctor_app_flutter/models/patient/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/prescription_req_model.dart';
import 'package:doctor_app_flutter/models/patient/prescription_res_model.dart';
import 'package:doctor_app_flutter/models/patient/radiology_res_model.dart';
import 'package:doctor_app_flutter/widgets/auth/login_form.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:http_interceptor/http_client_with_interceptor.dart';
@ -34,6 +33,7 @@ class PatientsProvider with ChangeNotifier {
List<LabOrdersResModel> patientLabResultOrdersList = [];
List<PrescriptionResModel> patientPrescriptionsList = [];
List<RadiologyResModel> patientRadiologyList = [];
var patientProgressNoteList = [];
Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
@ -293,4 +293,75 @@ class PatientsProvider with ChangeNotifier {
handelCatchErrorCase(err);
}
}
getPatientProgressNote(patient) async{
//setBasicData();
try {
if (await Helpers.checkConnection()) {
final response =await AppClient.post(PATIENT_PROGRESS_NOTE_URL, body: json.encode(patient));
final int statusCode = response.statusCode;
isLoading = false;
if (statusCode < 200 || statusCode >= 400 || json == null) {
isError = true;
error = 'Error While Fetching data';
} else {
var res = json.decode(response.body);
print('$res');
if (res['MessageStatus'] == 1) {
patientProgressNoteList = res['List_GetPregressNoteForInPatient'];
} else {
isError = true;
error = res['ErrorMessage'] ?? res['ErrorEndUserMessage'];
}
}
} else {
isLoading = false;
isError = true;
error = 'Please Check The Internet Connection';
}
notifyListeners();
} catch (err) {
handelCatchErrorCase(err);
}
}
getPatientInsuranceApprovals(patient) async{
//setBasicData();
try {
if (await Helpers.checkConnection()) {
final response =await AppClient.post(PATIENT_INSURANCE_APPROVALS_URL, body: json.encode(patient));
final int statusCode = response.statusCode;
isLoading = false;
if (statusCode < 200 || statusCode >= 400 || json == null) {
isError = true;
error = 'Error While Fetching data';
} else {
var res = json.decode(response.body);
print('$res');
if (res['MessageStatus'] == 1) {
//patientRadiologyList = [];
res['List_ApprovalMain_InPatient'].forEach((v) {
//patientRadiologyList.add(new RadiologyResModel.fromJson(v));
});
} else {
isError = true;
error = res['ErrorMessage'] ?? res['ErrorEndUserMessage'];
}
}
} else {
isLoading = false;
isError = true;
error = 'Please Check The Internet Connection';
}
notifyListeners();
} catch (err) {
handelCatchErrorCase(err);
}
}
}

@ -1,3 +1,5 @@
import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart';
import './screens/patients/profile/vital_sign/body_measurements_screen.dart';
import './screens/QR_reader_screen.dart';
@ -47,6 +49,7 @@ const String VITAL_SIGN = 'patients/vital-sign';
const String LAB_ORDERS = 'patients/lab_orders';
const String PRESCRIPTIONS = 'patients/prescription';
const String RADIOLOGY = 'patients/radiology';
const String PROGRESS_NOTE = 'patients/progress-note';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String BODY_MEASUREMENTS = 'patients/body-measurements';
@ -75,6 +78,7 @@ var routes = {
LAB_ORDERS: (_) => LabOrdersScreen(),
PRESCRIPTIONS: (_) => PrescriptionScreen(),
RADIOLOGY: (_) => RadiologyScreen(),
PROGRESS_NOTE: (_) => ProgressNoteScreen(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
BODY_MEASUREMENTS: (_) => BodyMeasurementsScreen()
};

@ -0,0 +1,97 @@
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../config/shared_pref_kay.dart';
import '../../../config/size_config.dart';
import '../../../models/patient/patiant_info_model.dart';
import '../../../providers/patients_provider.dart';
import '../../../util/dr_app_shared_pref.dart';
import '../../../widgets/shared/app_scaffold_widget.dart';
import '../../../widgets/shared/app_texts_widget.dart';
import '../../../widgets/shared/card_with_bg_widget.dart';
import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../widgets/shared/profile_image_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
/*
*@author: ibrahim albitar
*@Date:15/5/2020
*@param:
*@return:
*@desc:
*/
class ProgressNoteScreen extends StatefulWidget {
@override
_ProgressNoteState createState() => _ProgressNoteState();
}
class _ProgressNoteState extends State<ProgressNoteScreen> {
PatientsProvider patientsProv;
var _isInit = true;
/*
*@author: ibrahim al bitar
*@Date:16/5/2020
*@param:
*@return:
*@desc:
*/
getProgressNoteList(context) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String token = await sharedPref.getString(TOKEN);
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
print(type);
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest(
visitType: 5,
admissionNo: int.parse(patient.admissionNo),
projectID: patient.projectId,
tokenID: token,
patientTypeID: patient.patientType,
languageID: 2);
patientsProv.getPatientProgressNote(progressNoteRequest.toJson());
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
if (_isInit) {
patientsProv = Provider.of<PatientsProvider>(context);
getProgressNoteList(context);
}
_isInit = false;
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "Progress Note",
showAppDrawer: false,
showBottomBar: false,
body: patientsProv.isLoading
? DrAppCircularProgressIndeicator()
: patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.patientVitalSignList.length == 0
? DrAppEmbeddedError(error: 'You don\'t have any Progress Note')
: Container(
margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05,
0,
SizeConfig.realScreenWidth * 0.05,
0),
child: ListView.builder(
itemCount: patientsProv.patientProgressNoteList.length,
itemBuilder: (BuildContext ctxt, int index) {
return AppText(patientsProv.patientProgressNoteList[index]["DoctorName"].toString());
}),
),
);
}
}

@ -51,8 +51,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
child: CircleAvatarWidget(
des: 'Vital Sign',
url: url + 'heartbeat.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
width: (contWidth) / 4.5,
height: (contWidth) / 4.5,
),
),
InkWell(
@ -62,8 +62,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
child: CircleAvatarWidget(
des: 'Lab Result',
url: url + 'lab.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
width: (contWidth) / 4.5,
height: (contWidth) / 4.5,
),
),
InkWell(
@ -73,8 +73,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
child: CircleAvatarWidget(
des: 'Prescription',
url: url + 'note.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
width: (contWidth) / 4.5,
height: (contWidth) / 4.5,
),
),
InkWell(
@ -85,8 +85,58 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
child: CircleAvatarWidget(
des: 'Radiology',
url: url + 'radiology-1.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
width: (contWidth) / 4.5,
height: (contWidth) / 4.5,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
InkWell(
onTap: () {
navigator(context, VITAL_SIGN);
},
child: CircleAvatarWidget(
des: 'Progress Notes',
url: url + 'heartbeat.png',
width: (contWidth) / 4.5,
height: (contWidth) / 4.5,
),
),
InkWell(
onTap: () {
navigator(context, PROGRESS_NOTE);
},
child: CircleAvatarWidget(
des: 'Insurance Aprovals',
url: url + 'lab.png',
width: (contWidth) / 4.5,
height: (contWidth) / 4.5,
),
),
InkWell(
onTap: () {
navigator(context, PRESCRIPTIONS);
},
child: CircleAvatarWidget(
des: 'Refer Patient ',
url: url + 'note.png',
width: (contWidth) / 4.5,
height: (contWidth) / 4.5,
),
),
InkWell(
//RADIOLOGY
onTap: () {
navigator(context, RADIOLOGY);
},
child: CircleAvatarWidget(
des: 'Orders',
url: url + 'radiology-1.png',
width: (contWidth) / 4.5,
height: (contWidth) / 4.5,
),
),
],
@ -146,7 +196,7 @@ class CircleAvatarWidget extends StatelessWidget {
),
AppText(
des,
fontSize: 2 * SizeConfig.textMultiplier,
fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
)
],

@ -21,21 +21,21 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
version: "2.4.1"
bazel_worker:
dependency: transitive
description:
@ -49,7 +49,7 @@ packages:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "2.0.0"
build:
dependency: transitive
description:
@ -126,7 +126,21 @@ packages:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
version: "1.1.3"
charts_common:
dependency: transitive
description:
name: charts_common
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
charts_flutter:
dependency: "direct main"
description:
name: charts_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
checked_yaml:
dependency: transitive
description:
@ -147,7 +161,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
version: "1.14.12"
connectivity:
dependency: "direct main"
description:
@ -182,7 +196,7 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "2.1.4"
csslib:
dependency: transitive
description:
@ -308,6 +322,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
imei_plugin:
dependency: "direct main"
description:
@ -503,7 +524,7 @@ packages:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.1.3"
scratch_space:
dependency: transitive
description:
@ -571,7 +592,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
version: "1.7.0"
stack_trace:
dependency: transitive
description:
@ -613,7 +634,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.11"
version: "0.2.15"
timing:
dependency: transitive
description:
@ -683,7 +704,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
version: "3.6.1"
yaml:
dependency: transitive
description:

Loading…
Cancel
Save