Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ RUN npm install --location=global bower -y
# Copy application code to the working directory
COPY entrypoint.sh /usr/

# Ensure entrypoint has Unix line endings (fix CRLF produced on Windows hosts)
RUN sed -i 's/\r$//' /usr/entrypoint.sh || true

EXPOSE 8181

RUN chmod +x /usr/entrypoint.sh
Expand Down
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 2 additions & 0 deletions medplat-android/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Mon Mar 02 15:23:06 IST 2026
gradle.version=7.2
Binary file added medplat-android/.gradle/checksums/checksums.lock
Binary file not shown.
Empty file.
26 changes: 26 additions & 0 deletions medplat-ui/files/nlp_query_demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>NLP Query Preview Demo</title>
<style>
body{font-family:Arial,Helvetica,sans-serif;margin:20px}
textarea{width:100%;height:80px}
pre{background:#f6f6f6;padding:10px}
.btn{padding:8px 12px;background:#007bff;color:white;border:none;border-radius:4px}
</style>
<script src="nlp_query_demo.js"></script>
</head>
<body>
<h2>NLP Query Preview</h2>
<p>Enter a natural-language query (e.g. "show name and age of patients where age &gt; 30")</p>
<textarea id="nlq" placeholder="e.g. show name and age of patients where age > 30"></textarea>
<div style="margin-top:8px">
<button class="btn" id="previewBtn">Preview SQL</button>
</div>
<h3>Preview</h3>
<div id="result">
<em>No preview yet.</em>
</div>
</body>
</html>
25 changes: 25 additions & 0 deletions medplat-ui/files/nlp_query_demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
document.addEventListener('DOMContentLoaded', function(){
const btn = document.getElementById('previewBtn');
const ta = document.getElementById('nlq');
const out = document.getElementById('result');
btn.addEventListener('click', async function(){
const q = ta.value.trim();
if(!q){ out.innerHTML = '<em>Enter a query first.</em>'; return; }
out.innerHTML = '<em>Loading preview...</em>';
try{
const res = await fetch('http://localhost:5003/preview', {
method: 'POST',
headers: {'Content-Type':'application/json'},
body: JSON.stringify({query: q})
});
const data = await res.json();
if(res.ok){
out.innerHTML = `<pre>${data.preview_sql}\n\nParams: ${JSON.stringify(data.params)}</pre>`;
} else {
out.innerHTML = `<div style="color:red">Error: ${data.message || 'Unknown error'}</div>`;
}
} catch(err){
out.innerHTML = `<div style="color:red">Connection error: ${err.message}</div>`;
}
});
});
Loading