-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSoC 2018 Project: PDF generator code for Patient Report section #1165
Conversation
An error for Demographics option. Working on it. |
Need any help? |
Sorry, I have not tested this yet myself. I have been working on the PR's from bottom up. |
Is this ready to test? |
yes @aethelwulffe its ready to test, just Demographics option is having some problems. |
What are the dems issues? Not finding them. Was this procedures report inclusion the fix? |
@2208Abhinav just looked at your code cool. Went through the code and saw the dowload button didnt have a class of cp-output just make sure you dont forget to add that we are going to do a revamping of those stuffs after gsoc |
Mua, if you do a "looking at cool code" then WRITE A REVIEW. K? We need you here, you are valuable, but we also have you on the hook for this GSOC thing, and we defined community involvement as "writing reviews" among other things. 😛 -This here is supposed to be a lateral organization. Everybody should be worked up to the point where they are part of the integration process. Right now, the dumbest three old turds in the project are the integrators and handle all the reviews. That is silly. 😉 |
@aethelwulffe the error correction is not included yet in the code. Is the Procedures Order code working fine? |
I think for the error that there are some HTML tags not closed properly that is why data is leaking. I will solve it. |
Oh...We have always had HTML errors in this junk. I tend to overlook such things, as none of this has ever worked right. I have always had...low expectations with this part of the application. I will adjust the bar up a notch or two! |
global $content_insu; | ||
if (@array_key_exists($key,$retar)) { | ||
$length = sizeof($retar{$key}); | ||
if ($retar{$key}[$length]{"value"} != "0000-00-00 00:00:00") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful with Date/Time strings in INNODB default MYSQL that format is a bad date, an empty date will be NULL not zero filled. LibreEHR has some old code (and data) that may already have ZERO dates, so all tests need to support both formats for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmccormi So am I required to use condition like if(($retar{$key}[$length]{"value"} != "0000-00-00 00:00:00")&&($retar{$key}[$length]{"value"} != NULL))
?
"WHERE po.procedure_order_id = ?", | ||
$orderid); | ||
|
||
$content_pro .= "(" . oeFormatShortDate(substr($orow['date'], 0, 10)) . ")<br><table border=\"1\" style=\"background-color: silver\"><tr><td>Patient ID</td>". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALL Strings need to be wrapped in xlt() translation functions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and they should be checked for standard terms. If something exists in the translations tables, you should use that (or change it everywhere). Not a bad idea when those who can provide translations actually go and do so. We have not ...ever... checked or updated the xlt() tables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmccormi should I use xlt() only with strings like xlt("Procedures Order") or also with the variables like xlt($facility['name']) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only for labels/instructions that are hard-coded. Never for variables. The translation is for the application, not any of the contents. The translations come from an old-school table lookup, so any new text added to applications must also be added to the translations table.
|
||
$pdf = new EHRPDF('p', 'mm', array(216, 279), true, 'UTF-8', false);//potrait, pdf unit in mm and height=279mm, width=216mm | ||
$pdf->AddPage(); | ||
$pdf->SetFont('dejavusans', '', 19); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems odd to set the font over and over, perhaps this should be a higher level setting or at least a defined variable at the top?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be needed with every call, BUUUT, I think that dejavusans is the asset's default font anyway....which is not saying that you don't have to specify...I don't know.
@2208Abhinav please edit your PR title with a GSOC 2018 prefix or suffix had a hard time finding this |
@muarachmann You can filter issues/PR's by choosing the tag "GSOC 2018" |
I think @aethelwulffe is right but still I changed the title @muarachmann 😄 |
…rs added and new code for history
@aethelwulffe test the code its ready 🤓 but just leave the demographics for now, it will be corrected in next submission. |
@tmccormi due to merge conflict I removed the second download button, but still you can test by using previous single download button. |
if($orow['specimen_type']) $content_pro .= "<td>Specimen Type</td>"; | ||
if($orow['specimen_type']) $content_pro .= "<td>" . xlt("Specimen Type") . "</td>"; | ||
|
||
$content_pro .= "<td>" . $orow['specimen_type'] . "</td></tr></table><br><br>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good that you included the xlt functions but these green lines and red stuffs makes my eyes go 🙄 will test and get back to a line id needed
Good you included the xlt functions those green and red lines make my eyes 👀 will test and get back to the line in case. |
Worry not much about merge conflict for your GSoC project at the end it would be resolved |
@teryhill did you check the code? I want the output PDF of the options selected collectively that I mentioned on the chat. |
Checks worked fine, but need to address the zero-date concern from Tony. |
@aethelwulffe I will do it in the end first I am making the whole base then minor issues will be solved. |
@2208Abhinav OH, I know all that. Just documenting the status of a test...for the at-the-moment. I have been really doing poorly keeping up with testing of branches for the last two weeks, and I am just trying to get on top of things. |
@tmccormi @teryhill @aethelwulffe I pushed some new code, removed error for Demographics please test the code. |
Testing will commence at 15:00 EST |
Hi folks,
Sure, those are warnings, but why is it getting called so much? Basically this seems to be killing my system. I dare not push the current branch to production. |
The errors I am getting are not related to this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PDF prototype in there, but this commit tests well.
When you need another test (or you declare victory) I am ready to do so.
@teryhill @aethelwulffe @tmccormi @nileshprasad137 I did the final commit please check it. I will integrate the PDF generation code for @Trodrige project after GSOC. I have writen the code for it and I am waiting for its integration in main EHR software. |
PDF code for Review of Systems and Review of Systems Checks is left due due to previous bugs. |
NOTE : The code is left for Review of Systems and Review of Systems Checks. |
Tested as-is |
Review of Systems and Review of Systems Checks is due for replacement itself. Long overdue. There are contrib repo chunks related to a possible replacement. |
@2208Abhinav Could you please address @tmccormi request to change the comment headers so we can merge this? It is an awesome and much needed thing. Pretty please? |
@aethelwulffe I added the new comment headers like it was asked long ago. |
@aethelwulffe what other changes do I need to add for this to be mergeable |
I was looking at an old commit. |
OK. |
This code will create the PDFs for the Patient Report section which will be tested using Test Download button.
![screenshot from 2018-06-04 11-18-28](https://user-images.githubusercontent.com/30211121/40900443-377830d0-67e9-11e8-874a-fe078506f87a.png)