Skip to content

Commit

Permalink
Merge pull request #79 from rikyperdana/local
Browse files Browse the repository at this point in the history
crit fix pdf soap
  • Loading branch information
rikyperdana authored Sep 1, 2020
2 parents 20c6306 + 4214356 commit 32ef44f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion development/doms.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ makeReport = (name, action, selections) => m('.box',
),

defaultStyle = objDB => 11001001001 ? // dbConnector?
((+localStorage['license'] || 0) > _.now()) ? objDB : withThis(
((+localStorage[false || 'license'] || 0) > _.now()) ? objDB : withThis(
{decoration: _.camelCase(_.initial(['line', 'through', 'database']).join(' '))},
({decoration}) => _.merge({defaultStyle: {decoration}}, objDB)
) : objDB,
Expand Down
1 change: 0 additions & 1 deletion development/inpatient.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ _.assign(comp, {
m('h4', 'Rincian SOAP'),
m('table.table',
m('tr', m('th', 'Waktu observasi'), m('td', hari(j.tanggal, true))),
m('tr', m('th', 'Anamnesa'), m('td', j.anamnesa)),
j.diagnosa ? makeRincianSoapDokter(j) : makeRincianSoapPerawat(j)
),
m('.button.is-info',
Expand Down
21 changes: 11 additions & 10 deletions development/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ makePdf = {
''
]
]}},
rawat.soapPerawat && [
rawat.soapPerawat ? [
{text: '\nSOAP Perawat', alignment: 'center', bold: true},
{table: {widths: ['*', '*', '*'], body: [
[
Expand All @@ -133,8 +133,8 @@ makePdf = {
'Sumber: '+(_.get(rawat, 'soapPerawat.sumber_rujukan') || '-')
],
]}},
],
rawat.soapDokter && [
] : '',
rawat.soapDokter ? [
{text: '\nSOAP Dokter', alignment: 'center', bold: true},
{table: {widths: ['auto', '*'], body: [
['Anamnesa dokter', (_.get(rawat, 'soapDokter.anamnesa') || '-')],
Expand Down Expand Up @@ -168,27 +168,28 @@ makePdf = {
]}}
],
_.get(rawat, 'soapDokter.radio') && [
{text: '\nObat', alignment: 'center'},
{text: '\nRadiologi', alignment: 'center'},
{table: {widths: ['*', 'auto', 'auto'], body: [
['Radiologi', 'No. Berkas', 'Diagnosa'],
..._.get(rawat, 'soapDokter.radio').map(i => [
lookReferences(i.idradio).nama,
_.get(lookReferences(i.idradio), 'nama'),
i.kode_berkas, i.diagnosa
])
]}}
],
_.get(rawat, 'soapDokter.labor') && [
{text: '\nObat', alignment: 'center'},
{text: '\nLaboratorium', alignment: 'center'},
{table: {widths: ['*', 'auto'], body: [
['Laboratorium', 'Diagnosa'],
..._.get(rawat, 'soapDokter.labor').map(i => [
lookReferences(i.idlabor).nama,
i.hasil
_.get(lookReferences(i.idlabor), 'nama'),
i.hasil || '-'
])
]}}
]
]
]})).download('soap_'+identitas.no_mr),
].filter(Boolean) : ''
].filter(Boolean)}))
.download('soap_'+identitas.no_mr),

resep: (drugs, no_mr) =>
pdfMake.createPdf(defaultStyle({content: [
Expand Down
3 changes: 2 additions & 1 deletion development/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ _.assign(comp, {
}, 'Reset Antrian')
),
Array(3).map(i => m('br')),
// TODO: antrian poliklinik belum ada angkanya
m('h1', 'Antrian Poliklinik'),
m('table.is-fullwidth.is-striped',
selects('klinik')().map(i => m('tr',
m('td', m('h2', i.label))
))
)
)
})
})
2 changes: 1 addition & 1 deletion production/bundled.min.js

Large diffs are not rendered by default.

0 comments on commit 32ef44f

Please sign in to comment.