mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-03-09 14:33:32 +00:00
Tester work
This commit is contained in:
parent
7736e201e2
commit
51c95219f6
@ -7,12 +7,12 @@ This file is a Thymeleaf template for the
|
|||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script type="text/javascript" src="jquery-2.1.0.min.js"></script>
|
|
||||||
<script type="text/javascript" src="PublicTester.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var serverBase = "<th:block th:text="${base}"/>";
|
var serverBase = "<th:block th:text="${base}"/>";
|
||||||
var conformance = <th:block th:text="${jsonEncodedConf}"/>;
|
var conformance = <th:block th:utext="${jsonEncodedConf}"/>;
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript" src="jquery-2.1.0.min.js"></script>
|
||||||
|
<script type="text/javascript" src="PublicTester.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="PublicTester.css"/>
|
<link rel="stylesheet" type="text/css" href="PublicTester.css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -16,6 +16,43 @@ function clearCurrentForm(postCompleteFunction) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Create a tester form for the 'search' method */
|
||||||
|
/*
|
||||||
|
function displayRead(expandoTr, resourceName) {
|
||||||
|
var postCompleteFunction = function() {
|
||||||
|
var contentCell = $('<td />');
|
||||||
|
currentForm = $('#' + expandoTr).append(
|
||||||
|
$('<td class="testerNameCell">Search</td>'),
|
||||||
|
contentCell
|
||||||
|
);
|
||||||
|
|
||||||
|
conformance.rest.forEach(function(rest){
|
||||||
|
rest.resource.forEach(function(restResource){
|
||||||
|
if (restResource.type == 'Patient') {
|
||||||
|
restResource.searchParam.forEach(function(searchParam){
|
||||||
|
var formElement = $('<form/>', { action: 'PublicTesterResult.html', method: 'POST' });
|
||||||
|
contentCell.append(
|
||||||
|
formElement.append(
|
||||||
|
$('<input />', { name: 'method', value: 'read', type: 'hidden' }),
|
||||||
|
$('<input />', { name: 'resourceName', value: resourceName, type: 'hidden' }),
|
||||||
|
$('<input />', { name: 'id', placeholder: 'Resource ID', type: 'text' }),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
formElement.append(
|
||||||
|
$('<br />'),
|
||||||
|
$('<input />', { type: 'submit', value: 'Submit' })
|
||||||
|
)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#' + expandoTr).fadeIn(500);
|
||||||
|
}
|
||||||
|
clearCurrentForm(postCompleteFunction);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/** Create a tester form for the 'read' method */
|
/** Create a tester form for the 'read' method */
|
||||||
function displayRead(expandoTr, resourceName) {
|
function displayRead(expandoTr, resourceName) {
|
||||||
var postCompleteFunction = function() {
|
var postCompleteFunction = function() {
|
||||||
@ -23,7 +60,7 @@ function displayRead(expandoTr, resourceName) {
|
|||||||
currentForm = $('#' + expandoTr).append(
|
currentForm = $('#' + expandoTr).append(
|
||||||
$('<td class="testerNameCell">Read</td>'),
|
$('<td class="testerNameCell">Read</td>'),
|
||||||
$('<td />').append(
|
$('<td />').append(
|
||||||
$('<form/>', { id: 'testerform', action: 'PublicTesterResult.html', method: 'POST' }).append(
|
$('<form/>', { action: 'PublicTesterResult.html', method: 'POST' }).append(
|
||||||
$('<input />', { name: 'method', value: 'read', type: 'hidden' }),
|
$('<input />', { name: 'method', value: 'read', type: 'hidden' }),
|
||||||
$('<input />', { name: 'resourceName', value: resourceName, type: 'hidden' }),
|
$('<input />', { name: 'resourceName', value: resourceName, type: 'hidden' }),
|
||||||
$('<input />', { name: 'id', placeholder: 'Resource ID', type: 'text' }),
|
$('<input />', { name: 'id', placeholder: 'Resource ID', type: 'text' }),
|
||||||
@ -44,7 +81,7 @@ function displayVRead(expandoTr, resourceName) {
|
|||||||
currentForm = $('#' + expandoTr).append(
|
currentForm = $('#' + expandoTr).append(
|
||||||
$('<td class="testerNameCell">VRead</td>'),
|
$('<td class="testerNameCell">VRead</td>'),
|
||||||
$('<td />').append(
|
$('<td />').append(
|
||||||
$('<form/>', { id: 'testerform', action: 'PublicTesterResult.html', method: 'POST' }).append(
|
$('<form/>', { action: 'PublicTesterResult.html', method: 'POST' }).append(
|
||||||
$('<input />', { name: 'method', value: 'vread', type: 'hidden' }),
|
$('<input />', { name: 'method', value: 'vread', type: 'hidden' }),
|
||||||
$('<input />', { name: 'resourceName', value: resourceName, type: 'hidden' }),
|
$('<input />', { name: 'resourceName', value: resourceName, type: 'hidden' }),
|
||||||
$('<input />', { name: 'id', placeholder: 'Resource ID', type: 'text' }),
|
$('<input />', { name: 'id', placeholder: 'Resource ID', type: 'text' }),
|
||||||
|
@ -55,7 +55,7 @@ public class TesterTest {
|
|||||||
|
|
||||||
PublicTesterServlet testerServlet = new PublicTesterServlet();
|
PublicTesterServlet testerServlet = new PublicTesterServlet();
|
||||||
testerServlet.setServerBase("http://localhost:" + myPort + "/fhir/context");
|
testerServlet.setServerBase("http://localhost:" + myPort + "/fhir/context");
|
||||||
testerServlet.setServerBase("http://fhir.healthintersections.com.au/open");
|
// testerServlet.setServerBase("http://fhir.healthintersections.com.au/open");
|
||||||
ServletHolder handler = new ServletHolder();
|
ServletHolder handler = new ServletHolder();
|
||||||
handler.setServlet(testerServlet);
|
handler.setServlet(testerServlet);
|
||||||
proxyHandler.addServlet(handler, "/fhir/tester/*");
|
proxyHandler.addServlet(handler, "/fhir/tester/*");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user