FHM08062601IBL - update print invoice url dinamis dan nama pasien di inform consent
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -513,14 +513,29 @@ module.exports = {
|
||||
this.urlprintnote = "/birt/run?__report=report/one/fo/rpt_t_002.rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx
|
||||
this.$store.commit("payment/update_open_print_note",true)
|
||||
},
|
||||
printInvoice(){
|
||||
this.printwidth = 800
|
||||
this.printtitle = ""
|
||||
let idx = this.$store.state.patient.selected_patient.T_OrderHeaderID
|
||||
let user = one_user()
|
||||
this.urlprintnote = "/birt/run?__report=report/one/fo/rpt_t_001.rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx
|
||||
this.$store.commit("payment/update_open_print_note",true)
|
||||
}
|
||||
async printInvoice(){
|
||||
this.printwidth = 800
|
||||
this.printtitle = ""
|
||||
let idx = this.$store.state.patient.selected_patient.T_OrderHeaderID
|
||||
let user = one_user()
|
||||
this.urlprintnote = "/birt/run?__report=report/one/fo/rpt_t_001.rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx
|
||||
try{
|
||||
let resp = await axios.post('/one-api/mockup/fo/cashier/payment/get_report_url_by_code', {
|
||||
token: one_token(),
|
||||
code_report: 'FO-INV-P-INA-02',
|
||||
params: {
|
||||
PUsername: user.M_UserUsername,
|
||||
PT_OrderHeaderID: idx,
|
||||
TS: '#TS'
|
||||
}
|
||||
})
|
||||
if(resp.status === 200 && resp.data.status === "OK" && resp.data.data.url){
|
||||
this.urlprintnote = resp.data.data.url
|
||||
}
|
||||
}
|
||||
catch(e){}
|
||||
this.$store.commit("payment/update_open_print_note",true)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ class Inform_consent extends MY_Controller
|
||||
|
||||
private function get_patient_data($orderHeaderId)
|
||||
{
|
||||
$cacheId = $this->ibl_patient_decrypt->populate_cache_by_order($orderHeaderId);
|
||||
$sql = "SELECT
|
||||
h.T_OrderHeaderID,
|
||||
h.T_OrderHeaderDate,
|
||||
@@ -101,16 +102,26 @@ class Inform_consent extends MY_Controller
|
||||
|
||||
$row = $this->ibl_patient_decrypt->decrypt_row($row);
|
||||
$title = trim($row['M_TitleName'] ?? '');
|
||||
$cacheRow = $this->db_onedev->query(
|
||||
"SELECT ppc_name
|
||||
FROM patient_print_cache
|
||||
WHERE ppc_order_id = ?
|
||||
ORDER BY ppc_id DESC
|
||||
LIMIT 1",
|
||||
[$orderHeaderId]
|
||||
)->row_array();
|
||||
$printName = trim($cacheRow['ppc_name'] ?? '');
|
||||
$row['patient_name'] = trim(
|
||||
($title ? $title . '. ' : '') .
|
||||
trim($row['M_PatientPrefix'] ?? '') . ' ' .
|
||||
trim($row['M_PatientName'] ?? '') . ' ' .
|
||||
trim($printName !== '' ? $printName : ($row['M_PatientName'] ?? '')) . ' ' .
|
||||
trim($row['M_PatientSuffix'] ?? '')
|
||||
);
|
||||
$row['dob'] = $row['M_PatientDOB'];
|
||||
$row['pob'] = $row['M_PatientPOB'] ?? '';
|
||||
$row['phone'] = $row['M_PatientHP'] ?? '';
|
||||
$row['alamat'] = $row['M_PatientAddressDescription'] ?? '';
|
||||
$this->ibl_patient_decrypt->delete_cache($cacheId);
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ class Inform_consent_cpmi extends MY_Controller
|
||||
{
|
||||
parent::__construct();
|
||||
$this->db_onedev = $this->load->database('onedev', true);
|
||||
$this->load->library('ibl_patient_decrypt');
|
||||
}
|
||||
|
||||
public function index()
|
||||
@@ -59,6 +60,7 @@ class Inform_consent_cpmi extends MY_Controller
|
||||
|
||||
private function get_patient_data($orderHeaderId)
|
||||
{
|
||||
$cacheId = $this->ibl_patient_decrypt->populate_cache_by_order($orderHeaderId);
|
||||
$sql = "SELECT
|
||||
h.T_OrderHeaderID,
|
||||
DATE_FORMAT(h.T_OrderHeaderDate, '%d-%m-%Y') as tanggal,
|
||||
@@ -86,7 +88,35 @@ class Inform_consent_cpmi extends MY_Controller
|
||||
WHERE h.T_OrderHeaderID = ?
|
||||
LIMIT 1";
|
||||
$qry = $this->db_onedev->query($sql, [$orderHeaderId]);
|
||||
return $qry ? $qry->row_array() : null;
|
||||
if (!$qry) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$row = $qry->row_array();
|
||||
if (!$row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$cacheRow = $this->db_onedev->query(
|
||||
"SELECT ppc_name
|
||||
FROM patient_print_cache
|
||||
WHERE ppc_order_id = ?
|
||||
ORDER BY ppc_id DESC
|
||||
LIMIT 1",
|
||||
[$orderHeaderId]
|
||||
)->row_array();
|
||||
$printName = trim($cacheRow['ppc_name'] ?? '');
|
||||
if ($printName !== '') {
|
||||
$row['patient_name'] = trim(
|
||||
trim((string)($row['M_TitleName'] ?? '')) . ' ' .
|
||||
trim((string)($row['M_PatientPrefix'] ?? '')) . ' ' .
|
||||
$printName . ' ' .
|
||||
trim((string)($row['M_PatientSuffix'] ?? ''))
|
||||
);
|
||||
}
|
||||
|
||||
$this->ibl_patient_decrypt->delete_cache($cacheId);
|
||||
return $row;
|
||||
}
|
||||
|
||||
private function get_consent_content()
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
module ibl-merge-report-service
|
||||
|
||||
go 1.24.0
|
||||
go 1.25.0
|
||||
|
||||
require github.com/pdfcpu/pdfcpu v0.11.1
|
||||
require github.com/pdfcpu/pdfcpu v0.12.1
|
||||
|
||||
require (
|
||||
github.com/clipperhouse/uax29/v2 v2.2.0 // indirect
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
|
||||
github.com/hhrutter/lzw v1.0.0 // indirect
|
||||
github.com/hhrutter/pkcs7 v0.2.0 // indirect
|
||||
github.com/hhrutter/tiff v1.0.2 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.19 // indirect
|
||||
github.com/hhrutter/pkcs7 v0.2.2 // indirect
|
||||
github.com/hhrutter/tiff v1.0.3 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.23 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
golang.org/x/crypto v0.43.0 // indirect
|
||||
golang.org/x/image v0.32.0 // indirect
|
||||
golang.org/x/text v0.30.0 // indirect
|
||||
golang.org/x/crypto v0.50.0 // indirect
|
||||
golang.org/x/image v0.39.0 // indirect
|
||||
golang.org/x/text v0.36.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
||||
@@ -1,23 +1,38 @@
|
||||
github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY=
|
||||
github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
|
||||
github.com/hhrutter/lzw v1.0.0 h1:laL89Llp86W3rRs83LvKbwYRx6INE8gDn0XNb1oXtm0=
|
||||
github.com/hhrutter/lzw v1.0.0/go.mod h1:2HC6DJSn/n6iAZfgM3Pg+cP1KxeWc3ezG8bBqW5+WEo=
|
||||
github.com/hhrutter/pkcs7 v0.2.0 h1:i4HN2XMbGQpZRnKBLsUwO3dSckzgX142TNqY/KfXg+I=
|
||||
github.com/hhrutter/pkcs7 v0.2.0/go.mod h1:aEzKz0+ZAlz7YaEMY47jDHL14hVWD6iXt0AgqgAvWgE=
|
||||
github.com/hhrutter/pkcs7 v0.2.2 h1:xMoifoVWah1LNym3C0pomEiLmyJyVIBXt/8oTPyPz+8=
|
||||
github.com/hhrutter/pkcs7 v0.2.2/go.mod h1:aEzKz0+ZAlz7YaEMY47jDHL14hVWD6iXt0AgqgAvWgE=
|
||||
github.com/hhrutter/tiff v1.0.2 h1:7H3FQQpKu/i5WaSChoD1nnJbGx4MxU5TlNqqpxw55z8=
|
||||
github.com/hhrutter/tiff v1.0.2/go.mod h1:pcOeuK5loFUE7Y/WnzGw20YxUdnqjY1P0Jlcieb/cCw=
|
||||
github.com/hhrutter/tiff v1.0.3 h1:POV5xITOE1Lt5FvP24ylft0LyCmHmc8GkJ1SVlvUyk0=
|
||||
github.com/hhrutter/tiff v1.0.3/go.mod h1:zZDLVY4cp9za2FLrryAaGszwWYAUM6DrRiBR0l//mxA=
|
||||
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
|
||||
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=
|
||||
github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/pdfcpu/pdfcpu v0.11.1 h1:htHBSkGH5jMKWC6e0sihBFbcKZ8vG1M67c8/dJxhjas=
|
||||
github.com/pdfcpu/pdfcpu v0.11.1/go.mod h1:pP3aGga7pRvwFWAm9WwFvo+V68DfANi9kxSQYioNYcw=
|
||||
github.com/pdfcpu/pdfcpu v0.12.1 h1:HwoN72zJCj+pPbfMDChYBTZrT7SY0VwgUzqeaId3I20=
|
||||
github.com/pdfcpu/pdfcpu v0.12.1/go.mod h1:7KPpVLMavcpliPrtN6o7Kuk3cFtYq8nii3SJnnsK7ps=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
|
||||
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
|
||||
golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q=
|
||||
golang.org/x/image v0.32.0 h1:6lZQWq75h7L5IWNk0r+SCpUJ6tUVd3v4ZHnbRKLkUDQ=
|
||||
golang.org/x/image v0.32.0/go.mod h1:/R37rrQmKXtO6tYXAjtDLwQgFLHmhW+V6ayXlxzP2Pc=
|
||||
golang.org/x/image v0.39.0 h1:skVYidAEVKgn8lZ602XO75asgXBgLj9G/FE3RbuPFww=
|
||||
golang.org/x/image v0.39.0/go.mod h1:sIbmppfU+xFLPIG0FoVUTvyBMmgng1/XAMhQ2ft0hpA=
|
||||
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
|
||||
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
|
||||
Reference in New Issue
Block a user