-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(RUP-395): Receta - modificar molécula-2vuelta
+ dosis
- Loading branch information
1 parent
50b0b9f
commit 178af77
Showing
3 changed files
with
200 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 88 additions & 43 deletions
131
src/app/modules/rup/components/elementos/recetaMedica.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,114 @@ | ||
<ng-container *ngIf="!soloValores"> | ||
<form #formMedicamento="ngForm"> | ||
<plex-wrapper> | ||
<form class="mt-1" #formMedicamento="ngForm"> | ||
<plex-select [(ngModel)]="medicamento.diagnostico" hintType="info" label="Diagnóstico" [data]="registros" | ||
name="diagnostico" multiline="true" (click)="loadRegistros()" [required]="true" | ||
hint="Se listaran los conceptos registrados en esta consulta" hintType="info" hintIcon="eye"> | ||
|
||
</plex-select> | ||
|
||
<plex-grid cols="2"> | ||
|
||
<plex-select [(ngModel)]="medicamento.generico" name="generico" (getData)="loadMedicamentoGenerico($event)" | ||
placeholder="Medicamento genérico" label="Medicamento" idField="conceptId" labelField="term" | ||
(change)="loadPresentaciones()" required="true"> | ||
</plex-select> | ||
<plex-select name="unidades" *ngIf="unidades.length > 0" [(ngModel)]="medicamento.unidades" | ||
[data]="unidades" placeholder="Seleccione una opción" label="Unidades por presentación" | ||
labelField="valor" required="true"> | ||
</plex-select> | ||
<plex-int name="unidades" label="Unidades por presentación" [(ngModel)]="medicamento.unidades" | ||
*ngIf="unidades.length == 0" required="true" min="1" max="90"> | ||
|
||
<div> | ||
<plex-select class="formEditar" name="unidades" *ngIf="unidades.length > 0 && !comprimidosEditados" | ||
[(ngModel)]="medicamento.cantidad" [data]="unidades" placeholder="Seleccione una opción" | ||
label="Cantidad" labelField="valor" required="true"> | ||
</plex-select> | ||
<plex-int class="formEditar" name="comprimidos" *ngIf="unidades.length == 0 || comprimidosEditados" | ||
label="Cantidad" [(ngModel)]="medicamento.cantidad" required="true" min="1" max="90"> | ||
</plex-int> | ||
<plex-button class="d-inline-flex" name="editar" type="warning" icon="pencil" tooltip="Editar cantidad" | ||
size="md" (click)="editarComprimidos()"> | ||
</plex-button> | ||
</div> | ||
</plex-grid> | ||
<plex-grid cols="2"> | ||
|
||
<plex-int name="envases" label="Cantidad de envases" [(ngModel)]="medicamento.cantEnvases" required="true" | ||
min="1" max="90"> | ||
</plex-int> | ||
<plex-int name="envases" label="Envases" [(ngModel)]="medicamento.cantidad" required="true" min="1" | ||
max="90"> | ||
</plex-int> | ||
<plex-text [(ngModel)]="medicamento.diagnostico" label="Diagnóstico" name="motivo" multiline="true" | ||
grow="full"> | ||
</plex-text> | ||
<plex-radio [(ngModel)]="medicamento.tipoReceta" label="Tipo de receta" type="horizontal" | ||
[data]="opcionesTipoReceta" name="tipoReceta"> | ||
|
||
<plex-grid cols="2" style="margin-top: 2rem;grid-gap: 0;"> | ||
<plex-bool [(ngModel)]="medicamento.tratamientoProlongado" name="tratamientoProlongado" type="slide" | ||
label="Tratamiento prolongado"> | ||
</plex-bool> | ||
<plex-select *ngIf="medicamento.tratamientoProlongado" [(ngModel)]="medicamento.tiempoTratamiento" | ||
name="tiempoTratamiento" [data]="tiemposTratamiento" required="true"> | ||
</plex-select> | ||
</plex-grid> | ||
</plex-grid> | ||
|
||
<div class="mt-2"> | ||
<plex-title name="tipoReceta" titulo="Tipo de receta" size="sm"></plex-title> | ||
|
||
<plex-radio class="m-2" [(ngModel)]="medicamento.tipoReceta" [data]="opcionesTipoReceta" name="tipoReceta"> | ||
</plex-radio> | ||
<plex-bool [(ngModel)]="medicamento.tratamientoProlongado" label="Tratamiento prolongado" | ||
name="tratamientoProlongado"> | ||
</plex-bool> | ||
</plex-wrapper> | ||
<plex-title titulo="Dosis diaria" size="sm"></plex-title> | ||
</div> | ||
|
||
<plex-title titulo="Indicaciones diarias" size="sm"> | ||
<plex-button name="botonCollapse" class="collapse-button" type="primary" size="sm" | ||
icon="{{ collapse ? 'chevron-down' : 'chevron-up'}}" | ||
title="{{ collapse ? 'Expandir' : 'Colapsar'}}" titlePosition="left" (click)="colapsar()"> | ||
</plex-button> | ||
</plex-title> | ||
<plex-wrapper> | ||
<plex-int name="cantidadDiaria" label="Dosis" [(ngModel)]="medicamento.dosisDiaria.cantidad" | ||
required="false" min="1" max="90"> | ||
</plex-int> | ||
<plex-int name="duracion" label="Cantidad de días" [(ngModel)]="medicamento.dosisDiaria.dias" | ||
required="false" min="1" max="90"> | ||
</plex-int> | ||
|
||
<div [hidden]="collapse" class="w-100"> | ||
<div class="d-flex"> | ||
<plex-text name="dosis" label="Dosis" [(ngModel)]="medicamento.dosisDiaria.dosis" required="false"> | ||
</plex-text> | ||
<plex-select name="Frecuencia" label="Frecuencia" [(ngModel)]="medicamento.dosisDiaria.frecuencia" | ||
required="false" [data]="horas"> | ||
</plex-select> | ||
<plex-int name="Duracion" label="Duración (días)" [(ngModel)]="medicamento.dosisDiaria.dias" | ||
required="false" min="1" max="90"> | ||
</plex-int> | ||
<plex-text name="notaMedica" label="Notas médicas" [(ngModel)]="medicamento.dosisDiaria.notaMedica" | ||
required="false" min="1" max="90"> | ||
</plex-text> | ||
</div> | ||
</div> | ||
</plex-wrapper> | ||
<plex-button type="success" [disabled]="!formMedicamento.valid" (click)="agregarMedicamento($event)" | ||
[validateForm]="formMedicamento">Agregar | ||
</plex-button> | ||
<div class="d-flex justify-content-end"> | ||
<plex-button name="botonAgregar" type="info" [disabled]="!formMedicamento.valid" | ||
(click)="agregarMedicamento($event)" [validateForm]="formMedicamento"> | ||
Agregar | ||
</plex-button> | ||
</div> | ||
</form> | ||
<plex-list size="sm" *ngIf="registro.valor.medicamentos" class="mt-3"> | ||
<plex-list size="md" *ngIf="registro.valor.medicamentos" class="mt-3"> | ||
<plex-item *ngFor="let item of registro.valor.medicamentos"> | ||
<plex-label [tituloBold]="true" titulo="{{ item.generico.term }}" subtitulo="{{ item.unidades }} {{item.presentacion.term }}(s) por {{ item.cantidad }} envase(s) o {{ item.dosisDiaria.cantidad }} {{item.presentacion.term }}(s) por {{ item.dosisDiaria.dias }} días | ||
"></plex-label> | ||
<plex-badge *ngIf="item.diagnostico" type="warning" hint="{{item.diagnostico}}" hintIcon="informacion" | ||
hintType="warning">Diagnóstico | ||
<plex-icon size="md" *ngIf="true" name="pildoras" class="icon icon--border--producto mr-2"> | ||
</plex-icon> | ||
<plex-label [tituloBold]="true" titulo="{{ item.generico.term }}" subtitulo=" {{ item.cantEnvases}} envase(s) de {{ item.cantidad}} {{item.presentacion.term }}(s) {{ item.dosisDiaria.dosis? '| ' + item.dosisDiaria.dosis : '| ' }} {{ item.dosisDiaria.frecuencia? ' cada ' + item.dosisDiaria.frecuencia.nombre: '' }} {{ item.dosisDiaria.dias? ' durante ' + item.dosisDiaria.dias + ' día(s)':'' }} | ||
"></plex-label> | ||
<plex-badge *ngIf="item.diagnostico" size="sm" type="warning" hintType="warning"> | ||
{{ truncateDiagnostico(item.diagnostico.nombre) }} | ||
</plex-badge> | ||
<plex-badge *ngIf="item.tratamientoProlongado" type="info">Tratamiento prolongado | ||
</plex-badge> | ||
<plex-badge type="info">{{item.tipoReceta}} | ||
<plex-badge *ngIf="item.tipoReceta" type="info">{{item.tipoReceta}} | ||
</plex-badge> | ||
<plex-button type="danger" size="sm" (click)="borrarMedicamento(item)" icon="delete"></plex-button> | ||
</plex-item> | ||
</plex-list> | ||
</ng-container> | ||
<div *ngIf="soloValores"> | ||
<plex-list size="sm" *ngIf="registro.valor.medicamentos"> | ||
<plex-list size="md" *ngIf="registro.valor.medicamentos"> | ||
<plex-item *ngFor="let item of registro.valor.medicamentos"> | ||
<plex-label [tituloBold]="true" titulo="{{ item.generico.term }}" subtitulo="{{ item.unidades }} {{item.presentacion.term }}(s) por {{ item.cantidad }} envase(s) o {{ item.dosisDiaria.cantidad }} {{item.presentacion.term }}(s) por {{ item.dosisDiaria.dias }} días | ||
"></plex-label> | ||
<plex-badge *ngIf="item.diagnostico" type="warning" hint="{{item.diagnostico}}" hintIcon="informacion" | ||
hintType="warning"> Diagnóstico</plex-badge> | ||
<plex-label [tituloBold]="true" titulo="{{ item.generico.term }}" subtitulo=" {{ item.cantEnvases}} envase(s) de {{ item.cantidad}} {{item.presentacion.term }}(s) {{ item.dosisDiaria.dosis? '| ' + item.dosisDiaria.dosis : '| ' }} {{ item.dosisDiaria.frecuencia? ' cada ' + item.dosisDiaria.frecuencia.nombre: '' }} {{ item.dosisDiaria.dias ? ' durante ' + item.dosisDiaria.dias + ' día(s)':'' }} | ||
"></plex-label> | ||
<plex-badge *ngIf="item.diagnostico" size="sm" type="warning" hintType="warning"> | ||
{{ truncateDiagnostico(item.diagnostico.nombre) }} | ||
</plex-badge> | ||
<plex-badge *ngIf="item.tratamientoProlongado" type="info">Tratamiento prolongado | ||
</plex-badge> | ||
<plex-badge type="info">{{item.tipoReceta}} | ||
<plex-badge *ngIf="item.tipoReceta" type="info">{{item.tipoReceta}} | ||
</plex-badge> | ||
</plex-item> | ||
</plex-list> | ||
</div> | ||
</div> |
14 changes: 14 additions & 0 deletions
14
src/app/modules/rup/components/elementos/recetaMedica.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.formEditar { | ||
margin-right: 0; | ||
display: inline-block; | ||
width: 85%; | ||
} | ||
|
||
.select-container { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.select-container plex-select { | ||
margin-right: 10px; | ||
} |