add new referral service

merge-requests/541/head
Mohammad Aljammal 5 years ago
parent 8d5cd9eb90
commit fd790978c4

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 KiB

@ -88,6 +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,

@ -68,6 +68,8 @@ const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT =
const GET_MY_REFERRAL_PATIENT = const GET_MY_REFERRAL_PATIENT =
'Services/DoctorApplication.svc/REST/GtMyReferralPatient'; 'Services/DoctorApplication.svc/REST/GtMyReferralPatient';
const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor';
const ADD_REFERRED_DOCTOR_REMARKS = const ADD_REFERRED_DOCTOR_REMARKS =
'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks'; 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks';

@ -0,0 +1,48 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class ReferralService extends BaseService {
//TODO Jammal
Future referralPatient(
{String admissionNo,
String roomID,
String referralClinic,
String referralDoctor,
String patientID,
String patientTypeID,
String referringClinic,
String referringDoctorRemarks,
String priority,String frequency,String extension}) async {
await getDoctorProfile();
hasError = false;
Map<String, dynamic> body = Map();
body['ProjectID'] = doctorProfile.projectID;
body['AdmissionNo'] = admissionNo;
body['RoomID'] = roomID;
body['ReferralClinic'] = referralClinic;
body['ReferralDoctor'] = referralDoctor;
body['CreatedBy'] = doctorProfile.doctorID;
body['EditedBy'] = doctorProfile.doctorID;
body['PatientID'] = patientID;
body['PatientTypeID'] = patientTypeID;
body['ReferringClinic'] = referringClinic;
body['ReferringDoctor'] = doctorProfile.doctorID;
body['ReferringDoctorRemarks'] = referringDoctorRemarks;
body['Priority'] = priority;
body['Frequency'] = frequency;
body['Extension'] = extension;
await baseAppClient.post(
REFER_TO_DOCTOR,
onSuccess: (dynamic response, int statusCode) {
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: body,
);
}
}

@ -52,7 +52,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row( Row(
children: [ children: [
AppText( AppText(
'Medical', 'Health',
fontSize: 15.0, fontSize: 15.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -62,7 +62,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row( Row(
children: [ children: [
AppText( AppText(
'Report', 'Summary',
fontSize: 30.0, fontSize: 30.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),

@ -536,11 +536,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 10, top: 10), left: 10, top: 10),
child: AppText( child: AppText(
TranslationBase.of( TranslationBase.of(context).searchPatientName,
context) fontSize: 13,
.searchPatientName,
fontWeight:
FontWeight.bold,
)), )),
AppTextFormField( AppTextFormField(
// focusNode: focusProject, // focusNode: focusProject,

@ -135,7 +135,7 @@ class LabResultWidget extends StatelessWidget {
color: Colors.white, color: Colors.white,
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,

@ -32,7 +32,7 @@ class DateUtils {
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
if(str.contains("/Date")){
final startIndex = str.indexOf(start); final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length); final endIndex = str.indexOf(end, startIndex + start.length);
@ -40,7 +40,11 @@ class DateUtils {
date = new DateTime.fromMillisecondsSinceEpoch( date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
} else { } else {
date = DateTime.now(); date = DateTime.now();
}
} else {
date = DateTime.parse(str);
} }
return date; return date;

@ -62,8 +62,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Medical" ,//TranslationBase.of(context).medicalReport, nameLine1: "Health" ,//TranslationBase.of(context).medicalReport,
nameLine2: "Report",//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,

@ -114,9 +114,9 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Medical", nameLine1: "Health",
//TranslationBase.of(context).medicalReport, //TranslationBase.of(context).medicalReport,
nameLine2: "Report", nameLine2: "Summary",
//TranslationBase.of(context).summaryReport, //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(
@ -124,10 +124,11 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
isDisable: true,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Health", nameLine1: "Medical",//Health
//TranslationBase.of(context).medicalReport, //TranslationBase.of(context).medicalReport,
nameLine2: "Summery", nameLine2: "Report",//Report
//TranslationBase.of(context).summaryReport, //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'), icon: 'patient/health_summary.png'),
PatientProfileButton( PatientProfileButton(

@ -51,8 +51,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: "Medical" ,//TranslationBase.of(context).medicalReport, nameLine1: "Health" ,//TranslationBase.of(context).medicalReport,
nameLine2: "Report",//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,

@ -59,6 +59,7 @@ class DoctorCard extends StatelessWidget {
Expanded( Expanded(
child: AppText( child: AppText(
doctorName, doctorName,
fontSize: 15,
bold: true, bold: true,
)), )),
Expanded( Expanded(

Loading…
Cancel
Save