Skip to content

Commit

Permalink
feat(rup): plantillas para solicitudes (#993)
Browse files Browse the repository at this point in the history
* feat(RUP):diferenciar solicitudes y procedimientos

* feat(rup):  diagnóstico/motivo impresion solicitud

Co-authored-by: Mariano Andres Botta <marianoabotta@gmail.com>
  • Loading branch information
waltergarrido and liquid36 authored Jun 12, 2020
1 parent 4819d7f commit 0e411d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class SolicitudPrestacionDefaultComponent extends HTMLComponent {
</p>
</div>
<div class="subregistro">
<p> Motivo: <small> {{{ valor.motivo }}} </small> </p>
<p> Diagnóstico/Motivo: <small> {{{ valor.motivo }}} </small> </p>
<p> Indicaciones: <small> {{{ valor.indicaciones }}} </small> </p>
{{#if valor.organizacionDestino}}
<p> Organización destino: <small> {{{ valor.organizacionDestino }}} </small> </p>
Expand Down
9 changes: 9 additions & 0 deletions modules/rup/controllers/plantillasRUP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ export async function remove(id) {

export async function find(data, req) {
const query: any = {};
if (data.esSolicitud !== undefined) {
if (data.esSolicitud) {
query['esSolicitud'] = true;
} else {
query['esSolicitud'] = false;
}
}
if (data.conceptId) {
query['conceptos.conceptId'] = data.conceptId;
}
Expand All @@ -62,10 +69,12 @@ export async function find(data, req) {
]
});
}

return await PlantillasRUP.find(query);
}

export async function findById(id) {

return await PlantillasRUP.findById(id);
}

1 change: 1 addition & 0 deletions modules/rup/schemas/plantillasRUP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface IPlantillasRUP extends Document {
}

export let PlantillasRUPSchema = new Schema({
esSolicitud: Boolean,
expression: String,
conceptos: [SnomedConcept],
profesional: {
Expand Down

0 comments on commit 0e411d7

Please sign in to comment.