1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef GCCSUNOS
#include <stddef.h>
#endif
#include "dicom.h"
#include "lst.h"
#include "condition.h"
#include "query_interface.h"
void
formatPatient(PATIENT_QUERY_MODULE * patient, int index, char *buf)
{
(void) sprintf(buf, "%-16s %-30s %-12s", patient->PatientID,
patient->PatientName, patient->BirthDate);
}
void
formatStudy(STUDY_QUERY_MODULE * study, int index, char *buf)
{
int
i;
(void) sprintf(buf, "%-16s %-16s %-10s", study->AccessionNumber,
study->StudyID, study->StudyDate);
strcat(buf, " ");
for (i = 0; i < (int) DIM_OF(study->SeriesModalities); i++) {
if (strlen(study->SeriesModalities[i]) == 0)
break;
strcat(buf, " ");
strcat(buf, study->SeriesModalities[i]);
}
}
|