refactor: move assistant examples to module
This commit is contained in:
parent
cc50fb8c59
commit
e4a95ad72e
3 changed files with 25 additions and 23 deletions
|
|
@ -494,7 +494,7 @@
|
|||
<script defer src="/js/extensions.js"></script>
|
||||
<script defer src="/js/notes.js"></script>
|
||||
<script defer src="/js/diagrams.js"></script>
|
||||
<script defer src="/js/clinicalAssistant.js"></script>
|
||||
<script type="module" src="/js/clinicalAssistant.js"></script>
|
||||
<script defer src="/js/nextcloud.js"></script>
|
||||
<script defer src="/js/wellVisit.js"></script>
|
||||
<script defer src="/js/shadess.js"></script>
|
||||
|
|
|
|||
22
public/js/assistant/data.js
Normal file
22
public/js/assistant/data.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
export var EMPTY_PROMPT_SETS = [
|
||||
[
|
||||
{ label: 'Status asthma escalation', prompt: 'In a 4-year-old with acute wheeze, when should magnesium sulfate be considered and what dose is recommended?' },
|
||||
{ label: 'Bilious vomiting', prompt: 'What are the red flags for bilious vomiting in neonates, and what immediate workup is recommended?' },
|
||||
{ label: 'Bronchiolitis vs asthma', prompt: 'Compare bronchiolitis and asthma management in infants, citing pediatric references.' }
|
||||
],
|
||||
[
|
||||
{ label: 'Febrile neonate', prompt: 'What initial workup and empiric antibiotics are recommended for a well-appearing febrile neonate?' },
|
||||
{ label: 'DKA fluids', prompt: 'Summarize pediatric DKA fluid strategy and cerebral edema warning signs.' },
|
||||
{ label: 'Croup escalation', prompt: 'When should a child with croup receive nebulized epinephrine and observation?' }
|
||||
],
|
||||
[
|
||||
{ label: 'Sepsis bolus', prompt: 'In pediatric septic shock, when should fluid boluses be limited and vasoactives started?' },
|
||||
{ label: 'Head injury CT', prompt: 'Which pediatric head injury features should prompt CT or observation?' },
|
||||
{ label: 'UTI fever', prompt: 'How should febrile UTI be evaluated and treated in young children?' }
|
||||
],
|
||||
[
|
||||
{ label: 'Sickle pain fever', prompt: 'How should fever and pain crisis be managed in a child with sickle cell disease?' },
|
||||
{ label: 'Neonatal jaundice', prompt: 'What bilirubin risk factors change phototherapy decisions in a newborn?' },
|
||||
{ label: 'Status seizure', prompt: 'Outline first- and second-line treatment for pediatric status epilepticus.' }
|
||||
]
|
||||
];
|
||||
|
|
@ -3,6 +3,8 @@
|
|||
// Backend contract intentionally uses /api/clinical-assistant/* so the
|
||||
// server can call native MCP directly without routing through mcpo.
|
||||
// ============================================================
|
||||
import { EMPTY_PROMPT_SETS } from './assistant/data.js';
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
|
|
@ -14,28 +16,6 @@
|
|||
var dynamicExamples = [];
|
||||
var generatedImages = {};
|
||||
var generatedImageSeq = 0;
|
||||
var EMPTY_PROMPT_SETS = [
|
||||
[
|
||||
{ label: 'Status asthma escalation', prompt: 'In a 4-year-old with acute wheeze, when should magnesium sulfate be considered and what dose is recommended?' },
|
||||
{ label: 'Bilious vomiting', prompt: 'What are the red flags for bilious vomiting in neonates, and what immediate workup is recommended?' },
|
||||
{ label: 'Bronchiolitis vs asthma', prompt: 'Compare bronchiolitis and asthma management in infants, citing pediatric references.' }
|
||||
],
|
||||
[
|
||||
{ label: 'Febrile neonate', prompt: 'What initial workup and empiric antibiotics are recommended for a well-appearing febrile neonate?' },
|
||||
{ label: 'DKA fluids', prompt: 'Summarize pediatric DKA fluid strategy and cerebral edema warning signs.' },
|
||||
{ label: 'Croup escalation', prompt: 'When should a child with croup receive nebulized epinephrine and observation?' }
|
||||
],
|
||||
[
|
||||
{ label: 'Sepsis bolus', prompt: 'In pediatric septic shock, when should fluid boluses be limited and vasoactives started?' },
|
||||
{ label: 'Head injury CT', prompt: 'Which pediatric head injury features should prompt CT or observation?' },
|
||||
{ label: 'UTI fever', prompt: 'How should febrile UTI be evaluated and treated in young children?' }
|
||||
],
|
||||
[
|
||||
{ label: 'Sickle pain fever', prompt: 'How should fever and pain crisis be managed in a child with sickle cell disease?' },
|
||||
{ label: 'Neonatal jaundice', prompt: 'What bilirubin risk factors change phototherapy decisions in a newborn?' },
|
||||
{ label: 'Status seizure', prompt: 'Outline first- and second-line treatment for pediatric status epilepticus.' }
|
||||
]
|
||||
];
|
||||
|
||||
document.addEventListener('tabChanged', function (e) {
|
||||
if (e.detail && e.detail.tab === 'assistant') initIfNeeded();
|
||||
|
|
|
|||
Loading…
Reference in a new issue