summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go19
-rw-r--r--templates/document_details.html38
2 files changed, 55 insertions, 2 deletions
diff --git a/main.go b/main.go
index 2a2f4d9..1c2b8f6 100644
--- a/main.go
+++ b/main.go
@@ -54,7 +54,7 @@ func main() {
Host: meili_host,
})
- index := client.Index("fda510k")
+ index := client.Index("510k")
http.HandleFunc("/classic/", func(w http.ResponseWriter, r *http.Request) {
t, _ := template.ParseFiles("templates/search.gtpl")
@@ -97,9 +97,26 @@ func main() {
"applicant",
"decision",
"decision_date",
+ "full_text",
"id",
"predicates",
"submission_date",
+ "contact",
+ "STREET1",
+ "STREET2",
+ "CITY",
+ "STATE",
+ "ZIP",
+ "COUNTRY_CODE",
+ "postal_code",
+ "REVIEWADVISECOMM",
+ "PRODUCTCODE",
+ "STATEORSUMM",
+ "CLASSADVISECOMM",
+ "SSPINDICATOR",
+ "TYPE",
+ "THIRDPARTY",
+ "EXPEDITEDREVIEW",
}}, &res)
fmt.Println(res)
documentDetailsTemplate2.Execute(w, DocumentResponse{
diff --git a/templates/document_details.html b/templates/document_details.html
index 7726d13..ea83539 100644
--- a/templates/document_details.html
+++ b/templates/document_details.html
@@ -63,6 +63,15 @@
<td>{{.SearchResults.applicant}}</td>
</tr>
<tr>
+ <th>Contact</th>
+ <td>
+ {{.SearchResults.contact}}<br>
+ {{.SearchResults.STREET1}} {{.SearchResults.STREET2}}<br>
+ {{.SearchResults.CITY}}, {{.SearchResults.STATE}} {{.SearchResults.ZIP}}<br>
+ {{.SearchResults.COUNTRY_CODE}}
+ </td>
+ </tr>
+ <tr>
<th>Decision</th>
<td>{{.SearchResults.decision}}</td>
</tr>
@@ -77,13 +86,40 @@
<tr>
<th>Predicates</th>
<td>{{ range .SearchResults.predicates}}
- <a href="https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfPMN/pmn.cfm?ID={{.}}">{{ . }}</a>&#32;
+ <a href="/dbentry?id={{.}}">{{ . }}</a>&#32;
{{ end }}</td>
</tr>
+ <tr>
+ <th>Decision</th>
+ <td>{{.SearchResults.decision}}</td>
+ </tr>
+ <tr>
+ <th>Product Code</th>
+ <td>{{.SearchResults.PRODUCTCODE}}</td>
+ </tr>
+ <tr>
+ <th>SSP Indicator</th>
+ <td>{{.SearchResults.SSPINDICATOR}}</td>
+ </tr>
+ <tr>
+ <th>Type</th>
+ <td>{{.SearchResults.TYPE}}</td>
+ </tr>
+ <tr>
+ <th>Reviewed by Third Party</th>
+ <td>{{.SearchResults.THIRDPARTY}}</td>
+ </tr>
+ <tr>
+ <th>Full Text (OCR)</th>
+ <td>
+ {{.SearchResults.full_text}}
+ </td>
+ </tr>
</tbody>
</table>
</div>
</div>
</section>
+
</body>
</html> \ No newline at end of file