Bacic PHP help needed, to shut up a Madonn...I mean Doctor.
After logging into PacsOne the users are taken to home.php, which has the Patient ID and the Study ID columns, clicking on the patient ID just takes us to another page to click another link (study ID) and that takes us to where we need to be. It seems like it an un-needed step. It is the same thing in browse.php, you click on the Patient ID to go to a page to click on another link to get to the patient data (from browse.php to study.php to get to series.php).
We need the Patient ID but don’t need the Study ID however it would be nice to have the study ID link attached to the patient ID on the browse page.
I tried this today, changing line 183
printf("\t<td>%s<a href='study.php?patientId=%s'>%s</a></font></td>\n",
To
printf("\t<td>%s<a href='series.php?patientId=%s&studyId=%s'>%s</a></font></td>\n",
Of course this didn’t work.
So I basically have;
if (strcasecmp($key, "Patient ID") == 0) {
$value = strlen($field)? $field : "(Blank)";
printf("\t<td>%s<a href='series.php?patientId=%s&studyId=%s'>%s</a></font></td>\n",
$MYFONT, urlencode($field), $value);
Any help with this would be great.
Thanks in advance
We need the Patient ID but don’t need the Study ID however it would be nice to have the study ID link attached to the patient ID on the browse page.
I tried this today, changing line 183
printf("\t<td>%s<a href='study.php?patientId=%s'>%s</a></font></td>\n",
To
printf("\t<td>%s<a href='series.php?patientId=%s&studyId=%s'>%s</a></font></td>\n",
Of course this didn’t work.
So I basically have;
if (strcasecmp($key, "Patient ID") == 0) {
$value = strlen($field)? $field : "(Blank)";
printf("\t<td>%s<a href='series.php?patientId=%s&studyId=%s'>%s</a></font></td>\n",
$MYFONT, urlencode($field), $value);
Any help with this would be great.
Thanks in advance
Last edited by Farwest on Wed Aug 02, 2006 11:16 pm, edited 2 times in total.
I found it easier on my users to just log in and be taken to browse.php instead of home.php ( I know I know but I guess that one extra click was a huge deal).
Any way now I just need the Patient ID link to take me to //localhost/PacsOne/series.php?patientId=%s&studyId=%s
I really have no clue what im doing here.
Any way now I just need the Patient ID link to take me to //localhost/PacsOne/series.php?patientId=%s&studyId=%s
I really have no clue what im doing here.
The Home page shows all accessible studies received today, while the Browse page shows all accessible patients in the database.
So if you browse from the Home page, you will navigate through a Study->Series->Instances hierarchy. If you browse from the Browse page, you will navigate through the Patient->Study->Series->Instances hierarchy.
The Patient ID link on the Home page is necessary, because a patient may have multiple studies and not all of them may be listed on the Home page, so clicking on the Patient ID link will let you see all studies of that particular patient.
So if you browse from the Home page, you will navigate through a Study->Series->Instances hierarchy. If you browse from the Browse page, you will navigate through the Patient->Study->Series->Instances hierarchy.
The Patient ID link on the Home page is necessary, because a patient may have multiple studies and not all of them may be listed on the Home page, so clicking on the Patient ID link will let you see all studies of that particular patient.
Im not to worried about duplicate patient names because I already have two patients with the same name and because the Patient ID's are not the same they dont seem to conflict.
Even if the same patient has multiple studies they will always have different Patient ID's. for each study.
Am I wrong in my thinking that this would alow me to get away with skipping study.php?
Thanks for the response.
Even if the same patient has multiple studies they will always have different Patient ID's. for each study.
Am I wrong in my thinking that this would alow me to get away with skipping study.php?
Thanks for the response.
Sorry I wasn't a bit more clear, perhaps I posted this in the wrong place,
I don't want this to be a change you make in the downloadable version of PacsOne.
This is a change I want to make on my system, to ease the use for our users.
I apologize for the confusion, I am just looking for some basic PHP support for my PacsOne configuration.
I don't suspect any sane person would want to make some of the PHP changes I have made.
I don't want this to be a change you make in the downloadable version of PacsOne.
This is a change I want to make on my system, to ease the use for our users.
I apologize for the confusion, I am just looking for some basic PHP support for my PacsOne configuration.
I don't suspect any sane person would want to make some of the PHP changes I have made.
There is a side effect if you make any customizations to the original PacsOne distrubutions, as you will need to keep track of the source code version changes yourself for any modified/customized files, since we do not keep track of customized files.
So the next time you upgrade to a newer version of PacsOne Server, you will need to resort to your revision control system and re-apply the same customizations to the newer version of the modified files.
So the next time you upgrade to a newer version of PacsOne Server, you will need to resort to your revision control system and re-apply the same customizations to the newer version of the modified files.
Agreed, in fact I did have to do quite a bit of work to get the last update installed.
I have been keeping a log of changes and there effects ever since.
As for the PHP changes, I’m sure that I changed the link correctly,
The old link
printf("\t<td>%s<a href='study.php?patientId=%s'>%s</a></font></td>\n",
Was changed to
printf("\t<td>%s<a href='series.php?patientId=%s&studyId=%s'>%s</a></font></td>\n",
The problem seems to be that the code does not know where to find the study id.
I need the patient ID to stay, I just need the link to be directed to the study.php page with the patients , “patient ID and study ID” so the series numbers will show.
Any ideas on what I’m doing wrong? Perhaps im missing a line that will tell the link where to get the study ID from?
Any help would be great.
Thanks Again.
I have been keeping a log of changes and there effects ever since.
As for the PHP changes, I’m sure that I changed the link correctly,
The old link
printf("\t<td>%s<a href='study.php?patientId=%s'>%s</a></font></td>\n",
Was changed to
printf("\t<td>%s<a href='series.php?patientId=%s&studyId=%s'>%s</a></font></td>\n",
The problem seems to be that the code does not know where to find the study id.
I need the patient ID to stay, I just need the link to be directed to the study.php page with the patients , “patient ID and study ID” so the series numbers will show.
Any ideas on what I’m doing wrong? Perhaps im missing a line that will tell the link where to get the study ID from?
Any help would be great.
Thanks Again.
As you can see Im lost, I dont need the "sex" row so I tried to replace it with the "Study ID", I thought that might help me understand my link problem, It made my understanding worse.What variables are you using for the 3 %s in the above printf() line?
Please note; I changed the link back so the system would work.
$columns["Patient ID"] = $patientId;
$columns["Patient Name"] = $row["firstname"] . " ";
if ($row["middlename"])
$columns["Patient Name"] .= $row["middlename"] . " ";
$columns["Patient Name"] .= $row["lastname"];
$columns["Birth Date"] = $row["birthdate"];
$columns["Study ID"] = $row["studyId"];
$columns["Age"] = $row["age"];
foreach ($columns as $key => $field) {
if (isset($field))
{
if (strcasecmp($key, "Patient ID") == 0) {
$value = strlen($field)? $field : "(Blank)";
printf("\t<td>%s<a href='series.php?patientId=%s&studyId=%s'>%s</a></font></td>\n",
$MYFONT, urlencode($field), $value);
}
else
printf("\t<td>%s%s</font></td>\n", $MYFONT, $field);
}
else
printf("\t<td>%sN/A</font></td>\n", $MYFONT);
}
print "<td>$MYFONT<a href='patient.php?patientId=$urlId'>Patient Report</a></font></td>\n";
if ($duplicates) {
if ($modifyAccess)
print "\t<td>$MYFONT<a href='resolveDup.php?duplicate=$urlId'>Resolve</a></font></td>\n";
else
print "\t<td>$MYFONT" . "Resolve</font></td>\n";
}
print "</tr>\n";
}
print "</table>\n";