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
3891b384
Commit
3891b384
authored
Jul 23, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encryptdata
parent
52ae1baa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Webservice_model.php
admin/application/models/Webservice_model.php
+8
-8
No files found.
admin/application/models/Webservice_model.php
View file @
3891b384
...
...
@@ -2976,9 +2976,9 @@ class Webservice_model extends CI_Model {
$this
->
db
->
where
(
'exam_procedure'
,
$value
->
exam_procedure
);
$proc
=
$this
->
db
->
get
(
'tbl_exams'
)
->
result
();
$new
[
'exams'
][
$key
][
'name'
]
=
$value
->
exam_procedure
;
$new
[
'exams'
][
$key
][
'name'
]
=
decrypt_data
(
$value
->
exam_procedure
)
;
foreach
(
$proc
as
$key1
=>
$value1
)
{
$new
[
'exams'
][
$key
][
'observations'
][]
=
$value1
->
observation
;
$new
[
'exams'
][
$key
][
'observations'
][]
=
decrypt_data
(
$value1
->
observation
)
;
}
}
...
...
@@ -3056,7 +3056,7 @@ class Webservice_model extends CI_Model {
if
(
$data
[
'has_healing_problems'
]){
$anamnese
[
'anamnese'
][
'others'
][]
=
'healing_problems'
;
}
$new
[
'diseases'
]
=
json_encode
(
$anamnese
);
$new
[
'diseases'
]
=
encrypt_data
(
json_encode
(
$anamnese
)
);
$rows
=
$this
->
db
->
get_where
(
'tbl_medical_records'
,
array
(
'booking_id'
=>
$data
[
'booking_id'
]))
->
row
();
if
(
$rows
){
unset
(
$new
[
'booking_id'
]);
...
...
@@ -3093,7 +3093,7 @@ class Webservice_model extends CI_Model {
$new
[
$key
][
'quantity'
]
=
$value
->
quantity
;
$new
[
$key
][
'procedure'
]
=
$value
->
dosage_and_administration
;
}
if
(
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'prescribtions'
=>
json_encode
(
$new
)),
array
(
'booking_id'
=>
$data
[
'booking_id'
])))
{
if
(
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'prescribtions'
=>
encrypt_data
(
json_encode
(
$new
))),
array
(
'booking_id'
=>
$data
[
'booking_id'
])))
{
$return
=
array
(
'status'
=>
'success'
);
}
else
{
$return
=
array
(
'status'
=>
'failed'
,
'message'
=>
'Something Went Wrong.. Try Again Later!'
);
...
...
@@ -3146,7 +3146,7 @@ class Webservice_model extends CI_Model {
$new
[
$key
][
'procedure'
]
=
$value
->
name
;
$new
[
$key
][
'observation'
]
=
$value
->
observation
;
}
if
(
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'exams'
=>
json_encode
(
$new
)),
array
(
'booking_id'
=>
$data
[
'booking_id'
]))){
if
(
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'exams'
=>
encrypt_data
(
json_encode
(
$new
)
)),
array
(
'booking_id'
=>
$data
[
'booking_id'
]))){
$return
=
array
(
'status'
=>
'success'
);
}
else
{
$return
=
array
(
'status'
=>
'failed'
,
'message'
=>
'Something Went Wrong.. Try Again Later!'
);
...
...
@@ -3170,7 +3170,7 @@ class Webservice_model extends CI_Model {
$new
[
$key
][
'quantity'
]
=
$value
->
quantity
;
$new
[
$key
][
'amount'
]
=
$value
->
value
;
}
if
(
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'budget'
=>
json_encode
(
$new
)),
array
(
'booking_id'
=>
$data
[
'booking_id'
]))){
if
(
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'budget'
=>
encrypt_data
(
json_encode
(
$new
)
)),
array
(
'booking_id'
=>
$data
[
'booking_id'
]))){
$return
=
array
(
'status'
=>
'success'
);
}
else
{
$return
=
array
(
'status'
=>
'failed'
,
'message'
=>
'Something Went Wrong.. Try Again Later!'
);
...
...
@@ -3259,7 +3259,7 @@ class Webservice_model extends CI_Model {
if
(
!
isset
(
$_FILES
[
'photo'
])){
$data
[
'images'
]
=
''
;
}
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'other_observations'
=>
$data
[
'observations'
]
,
'images'
=>
$data
[
'images'
]),
array
(
'booking_id'
=>
$data
[
'booking_id'
]));
$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'
){
...
...
@@ -3297,7 +3297,7 @@ class Webservice_model extends CI_Model {
$new
[
'is_letter_with_cid'
]
=
$data
[
'is_letter_with_cid'
];
}
$new
[
'certificate'
]
=
$data
[
'medical_certificate'
];
if
(
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'letters'
=>
json_encode
(
$new
)),
array
(
'booking_id'
=>
$data
[
'booking_id'
]))){
if
(
$this
->
db
->
update
(
'tbl_medical_records'
,
array
(
'letters'
=>
encrypt_data
(
json_encode
(
$new
)
)),
array
(
'booking_id'
=>
$data
[
'booking_id'
]))){
$return
=
array
(
'status'
=>
'success'
);
}
else
{
$return
=
array
(
'status'
=>
'failed'
,
'message'
=>
'Something Went Wrong.. Try Again Later!'
);
...
...
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