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
14ec1f90
Commit
14ec1f90
authored
Aug 31, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doctor review
parent
140a56ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
Webservice.php
admin/application/controllers/Webservice.php
+1
-1
Webservice_model.php
admin/application/models/Webservice_model.php
+7
-6
No files found.
admin/application/controllers/Webservice.php
View file @
14ec1f90
...
@@ -5275,7 +5275,7 @@ class Webservice extends CI_Controller {
...
@@ -5275,7 +5275,7 @@ class Webservice extends CI_Controller {
if
(
isset
(
$headers
[
'Auth'
])
&&
strlen
(
$headers
[
'Auth'
]))
{
if
(
isset
(
$headers
[
'Auth'
])
&&
strlen
(
$headers
[
'Auth'
]))
{
$check_authToken
=
$this
->
Webservice_model
->
check_auth_token_doctor
(
$headers
[
'Auth'
]);
$check_authToken
=
$this
->
Webservice_model
->
check_auth_token_doctor
(
$headers
[
'Auth'
]);
if
(
$check_authToken
){
if
(
$check_authToken
){
if
(
isset
(
$_GET
[
'notification_id'
])
&&
strlen
(
trim
(
$_GET
[
'notification_id'
],
" "
))
>
0
&&
isset
(
$_GET
[
'status'
])
&&
strlen
(
trim
(
$_GET
[
'status'
],
" "
))
>
0
)
{
if
(
isset
(
$_GET
[
'notification_id'
])
&&
strlen
(
trim
(
$_GET
[
'notification_id'
],
" "
))
>
0
&&
isset
(
$_GET
[
'status'
])
)
{
$result
=
$this
->
Webservice_model
->
set_doctor_notification_status
(
$data
);
$result
=
$this
->
Webservice_model
->
set_doctor_notification_status
(
$data
);
if
(
$result
==
true
){
if
(
$result
==
true
){
$res
=
array
(
$res
=
array
(
...
...
admin/application/models/Webservice_model.php
View file @
14ec1f90
...
@@ -1915,21 +1915,20 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
...
@@ -1915,21 +1915,20 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$med_data
=
$this
->
db
->
get_where
(
'tbl_medical_records'
,
array
(
'id'
=>
$data
[
'medical_record_id'
]))
->
row
();
$med_data
=
$this
->
db
->
get_where
(
'tbl_medical_records'
,
array
(
'id'
=>
$data
[
'medical_record_id'
]))
->
row
();
if
(
$med_data
->
patient_review
!=
''
){
if
(
$med_data
->
patient_review
!=
''
){
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'patient_review'
=>
encrypt_data
(
$data
[
'review'
])),
array
(
'id'
=>
$data
[
'medical_record_id'
]));
$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
();
$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'
]
));
$this
->
db
->
update
(
'tbl_review'
,
array
(
'review'
=>
$data
[
'review'
]),
array
(
'booking_id'
=>
$med_data
->
booking_id
));
$insertid
=
$revw_data
->
id
;
$insertid
=
$revw_data
->
id
;
}
else
{
}
else
{
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'patient_review'
=>
encrypt_data
(
$data
[
'review'
])),
array
(
'id'
=>
$data
[
'medical_record_id'
]));
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'patient_review'
=>
encrypt_data
(
$data
[
'review'
])),
array
(
'id'
=>
$data
[
'medical_record_id'
]));
unset
(
$data
[
'medical_record_id'
]);
unset
(
$data
[
'medical_record_id'
]);
$this
->
db
->
insert
(
'tbl_review'
,
$data
);
$this
->
db
->
insert
(
'tbl_review'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
],
'reviewer_id'
=>
$rslt
->
userid
,
'review'
=>
$data
[
'review'
],
'date'
=>
$data
[
'date'
],
'booking_id'
=>
$med_data
->
booking_id
)
);
$insertid
=
$this
->
db
->
insert_id
();
$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'
));
if
(
$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
();
$doctor_insert_id
=
$this
->
db
->
insert_id
();
$fcm_doctor
=
$this
->
db
->
get_where
(
'tbl_authtoken_doctors'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
]))
->
row
();
$fcm_doctor
=
$this
->
db
->
get_where
(
'tbl_authtoken_doctors'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
]))
->
row
();
...
@@ -1940,13 +1939,15 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
...
@@ -1940,13 +1939,15 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$news
[
'to'
]
=
$fcm_doctor
->
fcm_token
;
$news
[
'to'
]
=
$fcm_doctor
->
fcm_token
;
$doctor_type
=
'2'
;
$doctor_type
=
'2'
;
$doctor_push
=
$this
->
push_sent
(
$news
,
$doctor_type
);
$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'
]));
$res
=
array
(
"status"
=>
"success"
,
"msg"
=>
"Insertion Success"
,
'data'
=>
array
(
'id'
=>
$insertid
,
'review'
=>
$data
[
'review'
]));
}
}
else
{
else
{
$res
=
array
(
"status"
=>
"failed"
,
"msg"
=>
"Insertion failed"
);
$res
=
array
(
"status"
=>
"failed"
,
"msg"
=>
"Insertion failed"
);
}
}
}
else
{
}
else
{
$res
=
array
(
"status"
=>
"failed"
,
"msg"
=>
"Medical Record Id Doesnot Exist"
);
}
}
else
{
$res
=
array
(
"status"
=>
"failed"
,
"msg"
=>
"Invalid Auth token"
);
$res
=
array
(
"status"
=>
"failed"
,
"msg"
=>
"Invalid Auth token"
);
}
}
return
$res
;
return
$res
;
...
...
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