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
Empty file added solicitudesHUDS/index.ts
Empty file.
25 changes: 25 additions & 0 deletions solicitudesHUDS/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
53 changes: 53 additions & 0 deletions solicitudesHUDS/squemas/pedidoSolic.squema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import * as mongoose from 'mongoose';

export type IPedidoSolic = {
institucion: {
id: number;
nombre: string;
};
descripcion: string;
efector: {
id: number;
nombre: string;
};
efectorParticular?: string;
paciente: any;
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 },
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,
path: String,
size: Number,
mimetype: String,
fecha: { type: Date, default: Date.now }
}
]
},
{ timestamps: true }
);



export const PedidoSolic = mongoose.model('pedidoSolic', PedidoSolicSchema);
37 changes: 37 additions & 0 deletions solicitudesHUDS/squemas/solicitante.squema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import * as mongoose from 'mongoose';

export type ISolicitante = {
nombre: string;
apellido: string;
tipoDocumento: {
dni: number;
pasaporte: number;
};
email: string;
telefono: number;
organismo: {
nombre: string;
codigo: number;
otro: string;
};
};

export const SolicitanteSchema = new mongoose.Schema({
nombre: String,
apellido: String,
tipoDocumento: {
dni: Number,
pasaporte: Number
},
email: String,
telefono: Number,
organismo: {
nombre: String,
codigo: Number,
otro: String,
},
});



export const Solicitante = mongoose.model('solicitantes', SolicitanteSchema);
30 changes: 30 additions & 0 deletions solicitudesHUDS/squemas/solicitudPac.squema.ts
Original file line number Diff line number Diff line change
@@ -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);
6 changes: 6 additions & 0 deletions solicitudesHUDS/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"include": [
"**/*.ts"
]
}