From b80a27b33116215868a7cef704df2c0c40f1ab1d Mon Sep 17 00:00:00 2001 From: nicolasarana <90768149+nicolasarana@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:46:46 -0300 Subject: [PATCH 1/3] feat(HUDS-178):"Squemas" --- solicitudesHUDS/index.ts | 0 solicitudesHUDS/package.json | 25 ++++++ solicitudesHUDS/squemas/solicitante.squema.ts | 80 +++++++++++++++++++ solicitudesHUDS/tsconfig.json | 6 ++ 4 files changed, 111 insertions(+) create mode 100644 solicitudesHUDS/index.ts create mode 100644 solicitudesHUDS/package.json create mode 100644 solicitudesHUDS/squemas/solicitante.squema.ts create mode 100644 solicitudesHUDS/tsconfig.json diff --git a/solicitudesHUDS/index.ts b/solicitudesHUDS/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/solicitudesHUDS/package.json b/solicitudesHUDS/package.json new file mode 100644 index 00000000..253cefcd --- /dev/null +++ b/solicitudesHUDS/package.json @@ -0,0 +1,25 @@ +{ + "name": "solicitudes-huds", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "start": "../node_modules/concurrently/bin/concurrently.js -r \"npm run tsc:w\" \"npm run node\" ", + "lint": "tslint --project .", + "tsc": "../node_modules/typescript/bin/tsc", + "tsc:w": "../node_modules/typescript/bin/tsc -w", + "node": "nodemon -q ./index.js" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@andes/bootstrap": "file:../bootstrap", + "@andes/log": "^2.2.5", + "@andes/match": "^1.1.12", + "async": "^2.6.1", + "html-entities": "^1.2.1", + "moment": "^2.22.0", + "mongoose": "^5.3.12", + "request": "^2.88.0" + } +} \ No newline at end of file diff --git a/solicitudesHUDS/squemas/solicitante.squema.ts b/solicitudesHUDS/squemas/solicitante.squema.ts new file mode 100644 index 00000000..ea935b8f --- /dev/null +++ b/solicitudesHUDS/squemas/solicitante.squema.ts @@ -0,0 +1,80 @@ +import * as mongoose from 'mongoose'; + +export type ISolicitante = { + key: string; + nombre: string; + descripcion: string; + coleccion: string; + query: any; + argumentos: { + key: string; + label: string; + tipo: string; + required: boolean; + subquery: any; + }[]; + mapping: { + columnName: string; + source: string; + target: string; + }[]; + export?: { + adapter: string, + table: string, + deleteColumnKey: string, + config: any; + }; + desdeAndes: boolean; + data?: any; + inactiva: { + estado: Boolean, + fecha: Date, + motivo: String + } +}; + +export interface IParams { + key: string; + valor: any; +} + +export const QuerySchema = new mongoose.Schema({ + key: String, + nombre: String, + descripcion: String, + coleccion: String, + query: mongoose.SchemaTypes.Mixed, + argumentos: [{ + key: String, + label: String, + tipo: String, + required: Boolean, + subquery: mongoose.SchemaTypes.Mixed, + + // componente: String, + // param: String, + // nombre: String, + // valor: String + + }], + mapping: [{ + columnName: String, + source: String, + target: String + }], + export: { + adapter: String, + table: String, + deleteColumnKey: String, + config: mongoose.SchemaTypes.Mixed + }, + data: mongoose.SchemaTypes.Mixed, + desdeAndes: Boolean, // Para las consultas que se acceden desde la Andes + inactiva: { + estado: Boolean, + fecha: Date, + motivo: String + } +}); + +export const Query = mongoose.model('queries', QuerySchema, 'queries') \ No newline at end of file diff --git a/solicitudesHUDS/tsconfig.json b/solicitudesHUDS/tsconfig.json new file mode 100644 index 00000000..3ae8d8b4 --- /dev/null +++ b/solicitudesHUDS/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.json", + "include": [ + "**/*.ts" + ] +} \ No newline at end of file From 0516a7f85dd4aaf1e30325deebbc6ffba3b48888 Mon Sep 17 00:00:00 2001 From: nicolasarana <90768149+nicolasarana@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:40:40 -0300 Subject: [PATCH 2/3] feat(HUDS-178):"Squema con adjuntar archivo" --- solicitudesHUDS/squemas/pedidoSolic.squema.ts | 41 ++++++++ solicitudesHUDS/squemas/solicitante.squema.ts | 97 ++++++------------- .../squemas/solicitudPac.squema.ts | 30 ++++++ 3 files changed, 98 insertions(+), 70 deletions(-) create mode 100644 solicitudesHUDS/squemas/pedidoSolic.squema.ts create mode 100644 solicitudesHUDS/squemas/solicitudPac.squema.ts diff --git a/solicitudesHUDS/squemas/pedidoSolic.squema.ts b/solicitudesHUDS/squemas/pedidoSolic.squema.ts new file mode 100644 index 00000000..83fcfda8 --- /dev/null +++ b/solicitudesHUDS/squemas/pedidoSolic.squema.ts @@ -0,0 +1,41 @@ +import * as mongoose from 'mongoose'; + +export type IPedidoSolic = { + institucion: { + id: number; + nombre: string; + }; + descripcion: string; + adjuntos: { + nombre: string; + path: string; + size: number; + mimetype: string; + fecha: Date; + }[]; +}; + + +export const PedidoSolicSchema = new mongoose.Schema( + { + institucion: { + id: { type: Number, required: true }, + nombre: { type: String, required: true } + }, + descripcion: { type: String, required: true }, + adjuntos: [ + { + nombre: String, + path: String, + size: Number, + mimetype: String, + fecha: { type: Date, default: Date.now } + } + ] + }, + { timestamps: true } +); + + + +export const PedidoSolic = mongoose.model('pedidoSolic', PedidoSolicSchema); diff --git a/solicitudesHUDS/squemas/solicitante.squema.ts b/solicitudesHUDS/squemas/solicitante.squema.ts index ea935b8f..6595be7d 100644 --- a/solicitudesHUDS/squemas/solicitante.squema.ts +++ b/solicitudesHUDS/squemas/solicitante.squema.ts @@ -1,80 +1,37 @@ import * as mongoose from 'mongoose'; export type ISolicitante = { - key: string; nombre: string; - descripcion: string; - coleccion: string; - query: any; - argumentos: { - key: string; - label: string; - tipo: string; - required: boolean; - subquery: any; - }[]; - mapping: { - columnName: string; - source: string; - target: string; - }[]; - export?: { - adapter: string, - table: string, - deleteColumnKey: string, - config: any; + apellido: string; + tipoDocumento: { + dni: number; + pasaporte: number; }; - desdeAndes: boolean; - data?: any; - inactiva: { - estado: Boolean, - fecha: Date, - motivo: String - } -}; - -export interface IParams { - key: string; - valor: any; -} + email: string; + telefono: number; + organismo: { + nombre: string; + codigo: number; + otro: string; + }; +}; -export const QuerySchema = new mongoose.Schema({ - key: String, +export const SolicitanteSchema = new mongoose.Schema({ nombre: String, - descripcion: String, - coleccion: String, - query: mongoose.SchemaTypes.Mixed, - argumentos: [{ - key: String, - label: String, - tipo: String, - required: Boolean, - subquery: mongoose.SchemaTypes.Mixed, - - // componente: String, - // param: String, - // nombre: String, - // valor: String - - }], - mapping: [{ - columnName: String, - source: String, - target: String - }], - export: { - adapter: String, - table: String, - deleteColumnKey: String, - config: mongoose.SchemaTypes.Mixed + apellido: String, + tipoDocumento: { + dni: Number, + pasaporte: Number }, - data: mongoose.SchemaTypes.Mixed, - desdeAndes: Boolean, // Para las consultas que se acceden desde la Andes - inactiva: { - estado: Boolean, - fecha: Date, - motivo: String - } + email: String, + telefono: Number, + organismo: { + nombre: String, + codigo: Number, + otro: String, + }, }); -export const Query = mongoose.model('queries', QuerySchema, 'queries') \ No newline at end of file + + +export const Solicitante = mongoose.model('solicitantes', SolicitanteSchema); diff --git a/solicitudesHUDS/squemas/solicitudPac.squema.ts b/solicitudesHUDS/squemas/solicitudPac.squema.ts new file mode 100644 index 00000000..d00ba271 --- /dev/null +++ b/solicitudesHUDS/squemas/solicitudPac.squema.ts @@ -0,0 +1,30 @@ +import * as mongoose from 'mongoose'; + +export type ISolicitudPac = { + nombre: string; + apellido: string; + documento: number; + email: string; + fechadeNacimiento: Date; + genero: { + id: number; + tipo: string; + } + +}; + +export const SolicitudPacSchema = new mongoose.Schema({ + nombre: String, + apellido: String, + documento: Number, + email: String, + fechadeNacimiento: Date, + genero: { + id: Number, + tipo: String, + }, +}); + + + +export const SolicitudPac = mongoose.model('solicitudPac', SolicitudPacSchema); From 0bdb371dbbb2c8987e9cd9a1035c424210daf8d7 Mon Sep 17 00:00:00 2001 From: nicolasarana <90768149+nicolasarana@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:13:17 -0300 Subject: [PATCH 3/3] feat(HUDS):""Formulario del pedido squema modif" --- solicitudesHUDS/squemas/pedidoSolic.squema.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/solicitudesHUDS/squemas/pedidoSolic.squema.ts b/solicitudesHUDS/squemas/pedidoSolic.squema.ts index 83fcfda8..91fc7d01 100644 --- a/solicitudesHUDS/squemas/pedidoSolic.squema.ts +++ b/solicitudesHUDS/squemas/pedidoSolic.squema.ts @@ -6,6 +6,12 @@ export type IPedidoSolic = { nombre: string; }; descripcion: string; + efector: { + id: number; + nombre: string; + }; + efectorParticular?: string; + paciente: any; adjuntos: { nombre: string; path: string; @@ -23,6 +29,12 @@ export const PedidoSolicSchema = new mongoose.Schema( nombre: { type: String, required: true } }, descripcion: { type: String, required: true }, + efector: { + id: { type: Number, required: true }, + nombre: { type: String, required: true } + }, + efectorParticular: { type: String }, + paciente: { type: mongoose.Schema.Types.ObjectId, ref: 'solicitudPac' }, adjuntos: [ { nombre: String,