Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IPok_Web
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IPok
IPok_Web
Commits
7d480f8b
Commit
7d480f8b
authored
Aug 30, 2018
by
Jemsheer K D
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jansa' of
https://gitlab.techware.co.in/IPok/IPok_Web
into jansa
parents
e1e339d4
140a56ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
23 deletions
+40
-23
Webservice_model.php
admin/application/models/Webservice_model.php
+40
-22
Doctor.php
application/controllers/Doctor.php
+0
-1
No files found.
admin/application/models/Webservice_model.php
View file @
7d480f8b
...
...
@@ -1283,7 +1283,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$msg
=
"Your booking for doctor "
.
$doctr_data
[
'name'
]
.
" at time "
.
$data
[
'time'
]
.
" is confirmed"
;
$msg2
=
"You have a new booking on "
.
date
(
'jS F Y'
,
$data
[
'date'
])
.
" at "
.
date
(
'h:i A'
,
$start_time
);
if
(
$this
->
db
->
insert
(
'tbl_booking'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
],
'clinic_id'
=>
$data
[
'clinic_id'
],
'patient_id'
=>
$patientid
[
'userid'
],
'ipok_fee'
=>
$ipokefees
,
'date'
=>
$data
[
'date'
],
'time'
=>
$data
[
'time'
],
'booking_status'
=>
'1'
,
'payment_status'
=>
$payment_status
,
'free_visit_status'
=>
$free_visit_status
,
'visit_type'
=>
$visit
,
'amount'
=>
$data
[
'amount'
],
'promo_name'
=>
$promo_name
,
'promo_amount'
=>
$new_amnt
,
'payment_type'
=>
$data
[
'payment_mode'
],
'total_sum'
=>
$diff
,
'time_start'
=>
$start_time
,
'time_end'
=>
$end_time
,
'requested_date'
=>
time
()))){
$insert_id
=
$this
->
db
->
insert_id
();
$insert_id
=
$this
->
db
->
insert_id
();
/*if($visit == '0'){
$doctor_wallet = $this->db->get_where('tbl_wallet_details',array('doctor_id'=>$data['doctor_id']))->row();
...
...
@@ -1605,6 +1605,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$query
=
$data
[
"query"
];
$where
=
'tbl_clinic.name LIKE '
.
"'
$query
%'"
;
$this
->
db
->
where
(
$where
);
$this
->
db
->
where
(
'tbl_clinic.id !='
,
'0'
);
}
if
(
isset
(
$data
[
'speciality'
])
&&
strlen
(
$data
[
'speciality'
])){
...
...
@@ -1741,6 +1742,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$this
->
db
->
join
(
'tbl_doctors'
,
'tbl_doctors.id = tbl_booking.doctor_id'
,
'INNER'
);
$this
->
db
->
where
(
'tbl_authtoken.authtoken'
,
$authtoken
);
$this
->
db
->
where
(
'tbl_booking.payment_status'
,
'1'
);
$this
->
db
->
order_by
(
'tbl_booking.id'
,
'DESC'
);
$query
=
$this
->
db
->
get
();
if
(
$query
->
num_rows
()
>
0
){
$result
=
array
(
'status'
=>
'success'
,
'data'
=>
$query
->
result_array
());
...
...
@@ -1910,25 +1912,38 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$query
=
$this
->
db
->
get_where
(
'tbl_booking'
,
array
(
'medical_record_id'
=>
$data
[
'medical_record_id'
]))
->
row
();
if
(
$query
){
if
(
$query
->
medical_record_id
!=
''
||
$query
->
medical_record_id
!=
'0'
){
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'patient_review'
=>
encrypt_data
(
$data
[
'review'
])),
array
(
'id'
=>
$data
[
'medical_record_id'
]));
$med_data
=
$this
->
db
->
get_where
(
'tbl_medical_records'
,
array
(
'id'
=>
$data
[
'medical_record_id'
]))
->
row
();
if
(
$med_data
->
patient_review
!=
''
){
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'patient_review'
=>
encrypt_data
(
$data
[
'review'
])),
array
(
'id'
=>
$data
[
'medical_record_id'
]));
$revw_data
=
$this
->
db
->
get_where
(
'tbl_review'
,
array
(
'booking_id'
=>
$med_data
[
'booking_id'
]))
->
row
();
$this
->
db
->
update
(
'tbl_review'
,
array
(
'review'
=>
$data
[
'review'
]),
array
(
'booking_id'
=>
$med_data
[
'booking_id'
]));
$insertid
=
$revw_data
->
id
;
}
else
{
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'patient_review'
=>
encrypt_data
(
$data
[
'review'
])),
array
(
'id'
=>
$data
[
'medical_record_id'
]));
unset
(
$data
[
'medical_record_id'
]);
$this
->
db
->
insert
(
'tbl_review'
,
$data
);
$insertid
=
$this
->
db
->
insert_id
();
}
}
}
unset
(
$data
[
'medical_record_id'
]);
if
(
$this
->
db
->
insert
(
'tbl_review'
,
$data
)){
$insertid
=
$this
->
db
->
insert_id
(
);
$this
->
db
->
insert
(
'tbl_doctor_notifications'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
],
'type'
=>
'1'
,
'message'
=>
$msg
,
'time'
=>
$data
[
'date'
],
'read_status'
=>
'0'
)
);
$doctor_insert_id
=
$this
->
db
->
insert_id
();
$fcm_doctor
=
$this
->
db
->
get_where
(
'tbl_authtoken_doctors'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
]))
->
row
();
$news
[
'id'
]
=
$doctor_insert_id
;
$news
[
'type'
]
=
"New Review"
;
$news
[
'message'
]
=
$msg
;
$news
[
'read_status'
]
=
false
;
$news
[
'to'
]
=
$fcm_doctor
->
fcm_token
;
$doctor_type
=
'2'
;
$doctor_push
=
$this
->
push_sent
(
$news
,
$doctor_type
);
$this
->
db
->
insert
(
'tbl_doctor_notifications'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
],
'type'
=>
'1'
,
'message'
=>
$msg
,
'time'
=>
$data
[
'date'
],
'read_status'
=>
'0'
)
);
$doctor_insert_id
=
$this
->
db
->
insert_id
(
);
$fcm_doctor
=
$this
->
db
->
get_where
(
'tbl_authtoken_doctors'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
]))
->
row
();
$news
[
'id'
]
=
$doctor_insert_id
;
$news
[
'type'
]
=
"New Review"
;
$news
[
'message'
]
=
$msg
;
$news
[
'read_status'
]
=
false
;
$news
[
'to'
]
=
$fcm_doctor
->
fcm_token
;
$doctor_type
=
'2'
;
$doctor_push
=
$this
->
push_sent
(
$news
,
$doctor_type
);
if
(
$doctor_push
){
$res
=
array
(
"status"
=>
"success"
,
"msg"
=>
"Insertion Success"
,
'data'
=>
array
(
'id'
=>
$insertid
,
'review'
=>
$data
[
'review'
]));
}
else
{
}
else
{
$res
=
array
(
"status"
=>
"failed"
,
"msg"
=>
"Insertion failed"
);
}
}
else
{
...
...
@@ -2555,7 +2570,9 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
}
$ill
=
json_decode
(
decrypt_data
(
$result
[
'diseases'
]));
if
(
$ill
==
''
){
// print_r( $ill );echo"<br>";
//print_r($ill->anamnese);exit();
if
(
!
isset
(
$ill
->
anamnese
)){
$new
=
[];
}
else
{
$new
=
array
();
...
...
@@ -2573,7 +2590,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
}
$result
[
'illness'
]
=
$new
;
if
(
$news
[
'cause'
]
!=
''
){
if
(
isset
(
$news
)
){
$others
=
$news
;
}
else
{
$others
=
[];
...
...
@@ -2620,6 +2637,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$tot
=
$tot
+
(
$value
->
amount
*
$value
->
quantity
);
}
$result
[
'services'
]
=
$bud
;
$result
[
'total'
]
=
$tot
;
}
unset
(
$result
[
'budget'
]);
...
...
@@ -2631,7 +2649,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
}
unset
(
$result
[
'images'
]);
unset
(
$result
[
'booking_id'
]);
$result
[
'total'
]
=
$tot
;
$res
=
array
(
'status'
=>
'success'
,
'data'
=>
$result
);
}
...
...
@@ -3776,7 +3794,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'other_observations'
=>
encrypt_data
(
$data
[
'observations'
]),
'images'
=>
$data
[
'images'
]),
array
(
'booking_id'
=>
$data
[
'booking_id'
]));
$doctor_wallet
=
$this
->
db
->
get_where
(
'tbl_wallet_details'
,
array
(
'doctor_id'
=>
$doctor_id
))
->
row
();
$earn
=
$res
->
total_sum
-
((
$res
->
total_sum
*
$res
->
ipok_fee
)
/
100
);
if
(
$res
->
visit_type
==
'0'
){
if
(
$res
->
visit_type
==
'0'
&&
$res
->
payment_type
==
'2'
){
if
(
$doctor_wallet
){
$redem_earn
=
decrypt_data
(
$doctor_wallet
->
reedem_earn
)
+
$earn
;
$future_earn
=
decrypt_data
(
$doctor_wallet
->
future_earn
)
-
$earn
;
...
...
@@ -4005,7 +4023,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
}
public
function
check_wait_listed
(
$data
){
$check
=
$this
->
db
->
get_where
(
'tbl_booking'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
],
'clinic_id'
=>
$data
[
'clinic_id'
],
'date'
=>
$data
[
'date'
],
'time'
=>
$data
[
'time'
]));
$check
=
$this
->
db
->
get_where
(
'tbl_booking'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
],
'clinic_id'
=>
$data
[
'clinic_id'
],
'date'
=>
$data
[
'date'
],
'time'
=>
$data
[
'time'
]
,
'payment_status'
=>
'1'
));
if
(
$check
->
num_rows
()
>
0
){
$is_booking
=
true
;
}
else
{
...
...
application/controllers/Doctor.php
View file @
7d480f8b
...
...
@@ -1146,7 +1146,6 @@ public function save_medicalrecord_finaldata()
exit
();
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment