add new referral service

merge-requests/541/head
Mohammad Aljammal 4 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("Body : ${json.encode(body)}");
var asd =json.encode(body);
var asd2;
if (await Helpers.checkConnection()) {
final response = await http.post(url,

@ -68,6 +68,8 @@ const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT =
const GET_MY_REFERRAL_PATIENT =
'Services/DoctorApplication.svc/REST/GtMyReferralPatient';
const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor';
const ADD_REFERRED_DOCTOR_REMARKS =
'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(
children: [
AppText(
'Medical',
'Health',
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
@ -62,7 +62,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row(
children: [
AppText(
'Report',
'Summary',
fontSize: 30.0,
fontWeight: FontWeight.w700,
),

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

@ -135,7 +135,7 @@ class LabResultWidget extends StatelessWidget {
color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].resultValue +
patientLabResultList[index].resultValue ??""+
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center,

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

@ -62,8 +62,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: "Medical" ,//TranslationBase.of(context).medicalReport,
nameLine2: "Report",//TranslationBase.of(context).summaryReport,
nameLine1: "Health" ,//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,

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

@ -51,8 +51,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: "Medical" ,//TranslationBase.of(context).medicalReport,
nameLine2: "Report",//TranslationBase.of(context).summaryReport,
nameLine1: "Health" ,//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,

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

Loading…
Cancel
Save