/* vaccine - do Vacceine and HIV Status section. */ #include "common.h" #include "hash.h" #include "linefile.h" #include "dystring.h" #include "cheapcgi.h" #include "spDb.h" #include "gsidSubj3.h" #include "hdb.h" #include "net.h" static boolean vaccineExists(struct section *section, struct sqlConnection *conn, char *subjId) /* Return TRUE if vaccineAll table exists and it has an entry with the gene symbol */ { if (sqlTableExists(conn, "gsidSubjInfo") == TRUE) { return(TRUE); } return(FALSE); } void vxprintf(char *templ, char *string) /* print "N/A" if the string to be printed is NULL */ { if (string == NULL) printf(templ, "N/A"); else printf(templ, string); } static void vaccinePrint(struct section *section, struct sqlConnection *conn, char *subjId) /* Print out Vaccine section. */ { char *immunStatus = NULL; char *daysInfectF = NULL; char *daysInfectL = NULL; char *injections = NULL; char *startDate = NULL; char *lastSeroNegDay = NULL; char *firstSeroPosDay = NULL; char *firstRNAPosDay = NULL; char *ESDBasis = NULL; char *seqDay = NULL; char *art_daei = NULL; char *art_sequencing = NULL; char query[256]; struct sqlResult *sr; char **row; printf("
"); printf("Vaccine/Placebo: %s%s", immunStatus, GSBLANKS); printf(" | "); printf(""); vxprintf("ART at Sequencing? %s", art_sequencing); printf(" | "); printf("
"); /* !!! currently all subjects in the database are infected. */ /* update this when non-infected subjects addded into DB */ printf("HIV Status: %s%s", "Infected", GSBLANKS); printf(" | "); printf(""); vxprintf("DAEI for ART Start: %s", art_daei); printf(" | "); printf(""); printf("Days of infection relative to last negative date: %s\n", daysInfectL); printf(" | "); */ printf("
"); printf("Injections: %s%s", injections, GSBLANKS); printf(" | "); printf(""); if (sameWord(lastSeroNegDay, "-1")) printf("Study Day of Last Serology-Negative HIV Test: %s\n", "N/A"); else vxprintf("Study Day of Last Serology-Negative HIV Test: %s\n", lastSeroNegDay); printf(" | "); printf("
"); vxprintf("Date of Study Start: %s\n", startDate); printf(" | "); printf(""); vxprintf("Study Day of First Serology-Positive HIV Test: %s\n", firstSeroPosDay); printf(" | "); printf("
"); vxprintf("Estimated Study Day of Infection (ESDI)*: %s\n", daysInfectF); printf(" | "); printf(""); vxprintf("Study Day of First RNA-positive HIV Test (NAT): %s\n", firstRNAPosDay); printf(" | "); printf("
"); if (sameWord(seqDay, "-1")) printf("Study Day of Sequencing: N/A\n"); else vxprintf("Study Day of Sequencing: %s\n", seqDay); printf(" | "); printf(""); vxprintf("Basis for ESDI: %s\n", ESDBasis); printf(" | "); printf("