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
2 changes: 1 addition & 1 deletion apps/apae/src/app/patients/[id]/documents/[type]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from "@/components/ui/select";

const documentTypeTranslations: Record<string, string> = {
MEDICAL_REPORT: "Laudo Médico",
MEDICAL_REPORT: "Laudo",
BIRTH_CERTIFICATE: "Certidão de Nascimento",
CPF: "CPF",
PRESCRIPTION: "Receita Médica",
Expand Down
8 changes: 4 additions & 4 deletions apps/apae/src/app/patients/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const InfoRow: React.FC<InfoRowProps> = ({ label, value }) => {

if (value === null || value === undefined || value === "") {
displayValue = "Não informado";
} else if (label === "Recebe BPC?") {
} else if (label === "Possui BPC?") {
displayValue = (value === true || String(value).toLowerCase() === 'true') ? "Sim" : "Não";
} else if (label === "Renda Familiar" && typeof value === 'number') {
displayValue = value.toLocaleString('pt-BR', {
Expand Down Expand Up @@ -381,11 +381,11 @@ export default function PersonDetailsPage() {
<div className="py-4 flex justify-center"><Loader2 className="h-6 w-6 animate-spin text-[#0D4F97]" /></div>
) : annualRegistry ? (
<div className="mt-2 animate-in fade-in slide-in-from-bottom-2">
<InfoRow label="Recebe BPC?" value={annualRegistry .bpc} />
<InfoRow label="Possui BPC?" value={annualRegistry .bpc} />
<InfoRow label="Renda Familiar" value={annualRegistry .familyIncome} />
<InfoRow label="Tipo de Atendimento" value={annualRegistry .serviceAreas?.map((atendimento) => atendimento.area).join(", ")} />
<InfoRow label="Doenças" value={annualRegistry.diseases?.trim() || null} />
<InfoRow label="Medicamentos Contínuos" value={annualRegistry .continuousMedication} />
<InfoRow label="Doenças (atuais e anteriores)" value={annualRegistry.diseases?.trim() || null} />
<InfoRow label="Medicação" value={annualRegistry .continuousMedication} />
<InfoRow label="Transtornos" value={annualRegistry.disorders?.map((d) => d.name).join(", ")} />
</div>
) : (
Expand Down
6 changes: 3 additions & 3 deletions apps/apae/src/app/patients/create/additional/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default function MembersRegisterAdditionalsPage() {
name="medications"
render={({ field }) => (
<FormItem>
<FormLabel>Tipo de medicação que toma</FormLabel>
<FormLabel>Medicação</FormLabel>
<FormControl>
<Input
placeholder="Losartana, paracetamol"
Expand Down Expand Up @@ -328,7 +328,7 @@ export default function MembersRegisterAdditionalsPage() {
name="disability.report"
render={({ field, fieldState }) => (
<FormItem>
<FormLabel>Laudo da Deficiência *</FormLabel>
<FormLabel>Laudo *</FormLabel>
<FormControl>
<DocumentUpload
id={field.name}
Expand Down Expand Up @@ -358,7 +358,7 @@ export default function MembersRegisterAdditionalsPage() {
name="care.types"
render={({ field }) => (
<FormItem>
<FormLabel>Tipos de Atendimentos *</FormLabel>
<FormLabel>Tipo de Atendimento *</FormLabel>
<FormControl>
<CreatableMultiSelect
key={`cares-select-${refreshKey}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function AnnualRegistryEditModal({
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<FormField control={form.control} name="bpc" render={({ field }) => (
<FormItem>
<FormLabel className="text-slate-700 font-bold text-xs">Recebe BPC?</FormLabel>
<FormLabel className="text-slate-700 font-bold text-xs">Possui BPC?</FormLabel>
<Select onValueChange={field.onChange} value={field.value}>
<FormControl><SelectTrigger className="bg-slate-50 border-slate-200 h-10 text-sm"><SelectValue placeholder="Selecione" /></SelectTrigger></FormControl>
<SelectContent>
Expand Down Expand Up @@ -153,10 +153,10 @@ export default function AnnualRegistryEditModal({

<FormField control={form.control} name="continuousMedication" render={({ field }) => (
<FormItem>
<FormLabel className={`font-bold text-xs ${errors.continuousMedication ? "text-red-500" : "text-slate-700"}`}>Medicamentos</FormLabel>
<FormLabel className={`font-bold text-xs ${errors.continuousMedication ? "text-red-500" : "text-slate-700"}`}>Medicação</FormLabel>
<FormControl>
<div className={errors.continuousMedication ? "border-red-500 border rounded-md" : ""}>
<StringMultiSelect value={field.value || ""} onChange={field.onChange} placeholder="Digite medicamentos..." />
<StringMultiSelect value={field.value || ""} onChange={field.onChange} placeholder="Digite a medicação..." />
</div>
</FormControl>
<FormMessage />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ export interface FullPatientData {
}

export const MEDICAL_DOC_TYPES = [
{ value: "MEDICAL_REPORT", label: "Laudo Médico" },
{ value: "MEDICAL_REPORT", label: "Laudo" },
{ value: "EXAMINATION", label: "Exame" },
{ value: "OTHER", label: "Outro" },
] as const;

export const DOC_TYPE_TRANSLATIONS: Record<string, string> = {
MEDICAL_REPORT: "Laudo Médico",
MEDICAL_REPORT: "Laudo",
EXAMINATION: "Exame",
OTHER: "Outro",
VACCINE_CARD: "Cartão de Vacina",
Expand Down
2 changes: 1 addition & 1 deletion apps/apae/src/domains/patients/schemas/member-schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const Additionals = z.object({
disability: z.object({
types: z
.array(z.string().min(1))
.min(1, "O tipo de atendimento é obrigatório."),
.min(1, "Selecione pelo menos uma opção."),
report: documentFileSchema,
}),
care: z.object({
Expand Down
Loading