Nurse Report: Preventing AI Hallucinations in Clinical Internship Reports with Strict Mode
How a vanilla JavaScript web app saves multi-session drafts in localStorage and builds Strict Mode prompts so LLMs never fabricate clinical data.
Anyone who has written daily Nursing internship reports knows how tiring it gets after a long shift—and prompting an AI without guardrails often produces generic text or, worse, fabricated clinical details.
That is why I built Nurse Report (live at https://rniguel.github.io/nurse-report/ and open-source at https://github.com/rniguel/nurse-report). Instead of making things up for the student, the web app turns real shift notes into a structured prompt aligned with Nursing curriculum guidelines.
Why Strict Mode Matters in Clinical Writing
In healthcare education, if an LLM decides to "fill in the gaps" with vital signs, medications, or diagnoses that never happened, the whole report becomes unreliable. To prevent that, the prompt builder exposes a Strict Mode toggle (modoEstrito) right alongside section switches:
const regraFidelidade = modoEstrito
? "⚠️ MODO ESTRITO ATIVADO: Utilize EXCLUSIVAMENTE as informações fornecidas nos campos abaixo. NÃO invente, adicione ou sugira dados clínicos (sinais vitais, diagnósticos, condições de pacientes, procedimentos, nome do paciente, história pregressa, medicamentos em uso) que não foram explicitamente relatados pelo aluno. Mantenha-se fiel ao texto original de cada campo."
: "Você pode enriquecer o relatório com seu conhecimento técnico-científico de enfermagem, desde que seja coerente com os dados fornecidos e com a área de atuação. ATENÇÃO: mesmo enriquecendo, NUNCA invente informações específicas de pacientes (sinais vitais, diagnósticos, condições clínicas, nomes, história pregressa, medicamentos) que não tenham sido relatadas nos campos.";Multi-Session Drafts in Pure localStorage
Since students take notes between shifts without wanting logins or servers, the app stores multiple report sessions directly in localStorage under nurse_report_app, saving both field values and section toggles (secaoAtividades, secaoReflexao, secaoDcn, and more).
function criarNovaSessao() {
var state = lerAppState() || {
sessions: {},
nextNumero: 1,
theme: "light",
};
var id = "sessao_" + Date.now();
var numero = state.nextNumero;
state.sessions[id] = {
id: id,
numero: numero,
date: "",
area: "",
nome: "",
fields: {},
config: {
modoEstrito: false,
perguntasIA: false,
modoCritico: false,
secaoAtividades: true,
secaoReflexao: true,
secaoPesquisa: true,
secaoDcn: true,
secaoCampo: true,
secaoProfessor: true,
secaoAutoavaliacao: true,
},
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
};
state.nextNumero = numero + 1;
state.activeSessionId = id;
salvarAppState(state);
}Final Thoughts
Treating prompt design as a UI problem—explicit checklists, clear constraints, and local draft persistence—makes AI tools far safer and easier to use on real day-to-day tasks.
Miguel Riquelme
Front-end Engineer. Software Engineering MBA student at USP/Esalq.