Esempio n. 1
0
class OxigenoTerapiaForm(FieldSetModelFormMixin):
    """Permite agregar y editar :class:`OxigenoTerapia`s"""
    class Meta:
        model = OxigenoTerapia

    admision = forms.ModelChoiceField(label="",
                                      queryset=Admision.objects.all(),
                                      widget=forms.HiddenInput(),
                                      required=False)

    usuario = forms.ModelChoiceField(label="",
                                     queryset=User.objects.all(),
                                     widget=forms.HiddenInput(),
                                     required=False)

    inicio = forms.DateTimeField(widget=DateTimeWidget(),
                                 required=False,
                                 initial=timezone.now)
    fin = forms.DateTimeField(widget=DateTimeWidget(),
                              required=False,
                              initial=timezone.now)

    cargo = ModelChoiceField(name="",
                             model="",
                             queryset=ItemTemplate.objects.filter(
                                 activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(OxigenoTerapiaForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Oxigeno Terapia', *self.field_names)
Esempio n. 2
0
class MedicamentoForm(AdmisionBaseForm):
    """Permite Agregar o modificar los datos de un :class:`Medicamento`"""
    class Meta:
        model = Medicamento
        exclude = ('proxima_dosis', 'suministrado')

    inicio = forms.DateTimeField(widget=DateTimeWidget(), required=False)
    cargo = ModelChoiceField(name='cargo',
                             model='',
                             queryset=ItemTemplate.objects.filter(
                                 activo=True).order_by('descripcion').all())

    admision = forms.ModelChoiceField(label="",
                                      queryset=Admision.objects.all(),
                                      widget=forms.HiddenInput(),
                                      required=False)

    usuario = forms.ModelChoiceField(label="",
                                     queryset=User.objects.all(),
                                     widget=forms.HiddenInput(),
                                     required=False)

    def __init__(self, *args, **kwargs):
        super(MedicamentoForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Recetar Medicamento',
                                      *self.field_names)
Esempio n. 3
0
class TipoPagoPeriodoForm(PeriodoForm):
    tipo = ModelChoiceField(name="", model="", queryset=TipoPago.objects.all())

    def __init__(self, *args, **kwargs):
        super(TipoPagoPeriodoForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Pagos por Tipo y Periodo',
                                      *self.field_names)
Esempio n. 4
0
 class Meta:
     model = Transferencia
     fields = ('aplicada', )
     item = ModelChoiceField(
         name="",
         model="",
         queryset=Requisicion.objects.filter(entregada=False).all())
Esempio n. 5
0
class ConsultorioFormMixin(FieldSetModelFormMixin):
    consultorio = ModelChoiceField(
        queryset=Consultorio.objects.filter(
            activo=True).order_by('nombre').all(),
        name="",
        model="",
    )
Esempio n. 6
0
class AseguradoraForm(FieldSetModelFormMixin):
    class Meta:
        model = Aseguradora
        fields = '__all__'

    representante = ModelChoiceField(
        queryset=Persona.objects.filter(mostrar_en_cardex=True).all(),
        name="representante",
        model="")
    cardex = ModelChoiceField(
        queryset=Persona.objects.filter(mostrar_en_cardex=True).all(),
        name="representante",
        model="")

    def __init__(self, *args, **kwargs):
        super(AseguradoraForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Formulario de Aseguradora',
                                      *self.field_names)
Esempio n. 7
0
class VentaPeriodoForm(PeriodoForm):
    item = ModelChoiceField(name="", model="",
                            queryset=ItemTemplate.objects.filter(
                                activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(VentaPeriodoForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Detalle de Ventas de un Periodo',
                                      *self.field_names)
Esempio n. 8
0
class CargoForm(HiddenConsultaFormMixin, HiddenUserForm):
    class Meta:
        model = Cargo
        exclude = ('facturado', )

    tipo = ModelChoiceField(
        queryset=ItemType.objects.filter(consulta=True).all(),
        name="",
        model="")

    item = ModelChoiceField(
        queryset=ItemTemplate.objects.all().order_by('descripcion'),
        name="",
        model="")

    def __init__(self, *args, **kwargs):
        super(CargoForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar Cargo', *self.field_names)
Esempio n. 9
0
class CargoForm(PacienteFormMixin):
    class Meta:
        model = Cargo
        exclude = ('facturado', )

    item = ModelChoiceField(queryset=ItemTemplate.objects.all(), name="",
                            model="")

    def __init__(self, *args, **kwargs):
        super(CargoForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar Cargo', *self.field_names)
Esempio n. 10
0
class HonorarioForm(AdmisionBaseForm):
    class Meta:
        model = Honorario

    item = ModelChoiceField(name="",
                            model="",
                            queryset=ItemTemplate.objects.filter(
                                activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(HonorarioForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar Honorarios', *self.field_names)
Esempio n. 11
0
class PlanForm(FieldSetModelFormMixin):
    class Meta:
        model = Plan
        fields = '__all__'

    item = ModelChoiceField(name="",
                            model="",
                            queryset=ItemTemplate.objects.filter(
                                activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(PlanForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Formulario de Plan', *self.field_names)
Esempio n. 12
0
class CitaForm(ConsultorioFormMixin):
    class Meta:
        model = Cita
        exclude = ('ausente', 'atendida',)

    persona = ModelChoiceField(queryset=Persona.objects.all(), name="",
                               model="")
    fecha = forms.DateTimeField(widget=DateTimeWidget(), required=False,
                                initial=timezone.now)

    def __init__(self, *args, **kwargs):
        super(CitaForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar una Cita', *self.field_names)
Esempio n. 13
0
class ItemCompradoForm(FieldSetModelFormMixin):
    class Meta:
        model = ItemComprado
        exclude = ('ingresado', )

    item = ModelChoiceField(name="",
                            model="",
                            queryset=ItemTemplate.objects.filter(
                                activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(ItemCompradoForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar Producto Comprado',
                                      *self.field_names)
Esempio n. 14
0
class MasterContractForm(FieldSetModelFormMixin):
    class Meta:
        model = MasterContract
        exclude = ('processed', )

    item = ModelChoiceField(name="",
                            model="",
                            queryset=ItemTemplate.objects.filter(
                                activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(MasterContractForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Crear un Contrato Maestro',
                                      *self.field_names)
Esempio n. 15
0
class EstudioForm(FieldSetModelFormMixin):
    class Meta:
        model = Estudio

    examen = forms.ModelChoiceField(label="",
                                    queryset=Examen.objects.all(),
                                    widget=forms.HiddenInput())
    tipo_de_examen = ModelChoiceField(queryset=TipoExamen.objects.all(),
                                      name="nombre",
                                      model="")

    def __init__(self, *args, **kwargs):
        super(EstudioForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar Examen', *self.field_names)
Esempio n. 16
0
class ItemRequisicionForm(FieldSetModelFormMixin):
    class Meta:
        model = ItemRequisicion
        exclude = ('entregada', 'pendiente')

    item = ModelChoiceField(name="",
                            model="",
                            queryset=ItemTemplate.objects.filter(
                                activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(ItemRequisicionForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Formulario de Requisición de Producto',
                                      *self.field_names)
Esempio n. 17
0
class ItemForm(FieldSetModelFormMixin):
    class Meta:
        model = Item

    plantilla = ModelChoiceField(
        name="",
        model="",
        queryset=ItemTemplate.objects.filter(
            activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(ItemForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Formulario de Item Inventariado',
                                      *self.field_names)
Esempio n. 18
0
class BeneficiarioPersonaForm(FieldSetModelFormMixin):
    class Meta:
        model = Beneficiario

    contrato = ModelChoiceField(
        queryset=Contrato.objects.filter(vencimiento__lte=timezone.now()),
        name="nombre", model="")
    inscripcion = forms.DateTimeField(widget=DateTimeWidget(), required=False,
                                      initial=timezone.now)

    def __init__(self, *args, **kwargs):
        super(BeneficiarioPersonaForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Formulario de Registro de Beneficiario',
                                      *self.field_names)
Esempio n. 19
0
class CobroForm(EmergenciaBaseForm):
    """Formulario para agregar :class:`Cobro`s"""
    class Meta:
        model = Cobro
        exclude = ('facturado', )

    cargo = ModelChoiceField(name="",
                             model="",
                             queryset=ItemTemplate.objects.filter(
                                 activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(CobroForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar Materiales y Medicamentos',
                                      *self.field_names)
Esempio n. 20
0
class BeneficiarioPersonaForm(BasePersonaForm):
    class Meta:
        model = Beneficiario
        exclude =('activo', 'dependiente',)

    contrato = ModelChoiceField(
        queryset=Contrato.objects.all(),
        name="nombre", model="")
    inscripcion = forms.DateTimeField(widget=DateTimeWidget(), required=False,
                                      initial=timezone.now)

    def __init__(self, *args, **kwargs):
        super(BeneficiarioPersonaForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Formulario de Registro de Beneficiario',
                                      *self.field_names)
Esempio n. 21
0
class PrescripcionForm(BasePersonaForm, HiddenConsultaFormMixin,
                       HiddenUserForm):
    class Meta:
        model = Prescripcion
        fields = '__all__'

    medicamento = ModelChoiceField(
        queryset=ItemTemplate.objects.all().order_by('descripcion'),
        name="",
        model="",
        required=False)

    def __init__(self, *args, **kwargs):
        super(PrescripcionForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar Prescripcion',
                                      *self.field_names)
Esempio n. 22
0
class DiagnosticoClinicoForm(BasePersonaForm, HiddenConsultaFormMixin,
                             HiddenUserForm):
    class Meta:
        model = DiagnosticoClinico
        fields = '__all__'

    afeccion = ModelChoiceField(
        queryset=Afeccion.objects.all().order_by('nombre'),
        name="",
        model="",
        required=False)

    def __init__(self, *args, **kwargs):
        super(DiagnosticoClinicoForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar un Diagnóstico',
                                      *self.field_names)
Esempio n. 23
0
class VentaForm(FieldSetModelFormMixin):
    """Genera un formulario para :class:`Venta`"""

    class Meta:
        model = Venta
        exclude = ('impuesto', 'descuento', 'descripcion', 'placas', )

    recibo = forms.ModelChoiceField(label="",
                                    queryset=Recibo.objects.all(),
                                    widget=forms.HiddenInput(), required=False)
    item = ModelChoiceField(name="", model="",
                            queryset=ItemTemplate.objects.filter(
                                activo=True).order_by('descripcion').all())

    def __init__(self, *args, **kwargs):
        super(VentaForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar un Cargo', *self.field_names)
Esempio n. 24
0
class ItemForm(FieldSetModelFormMixin):
    class Meta:
        model = Item
        fields = ("inventario", "plantilla", "cantidad", 'vencimiento')

    plantilla = ModelChoiceField(
        name="",
        model="",
        label="Item",
        queryset=ItemTemplate.objects.filter(
            activo=True).order_by('descripcion').all())

    vencimiento = forms.DateTimeField(widget=FutureDateWidget())

    def __init__(self, *args, **kwargs):
        super(ItemForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Formulario de Item Inventariado',
                                      *self.field_names)
Esempio n. 25
0
class CargoForm(AdmisionBaseForm):
    """Muestra un formulario que permite agregar :class:`Cargo`s a una
    :class:`Persona` durante una :class:`Admision`"""
    class Meta:
        model = Cargo
        exclude = ('facturada', )

    cargo = ModelChoiceField(queryset=ItemTemplate.objects.filter(
        activo=True).order_by('descripcion').all(),
                             name="nombre",
                             model="")
    inicio = forms.DateTimeField(widget=DateTimeWidget(),
                                 required=False,
                                 initial=timezone.now)
    fin = forms.DateTimeField(widget=DateTimeWidget(),
                              required=False,
                              initial=timezone.now)

    def __init__(self, *args, **kwargs):
        super(CargoForm, self).__init__(*args, **kwargs)
        self.helper.layout = Fieldset(u'Agregar Cargo', *self.field_names)
Esempio n. 26
0
class PeriodoAreaForm(PeriodoForm):
    area = ModelChoiceField(name="", model="",
                            queryset=ItemType.objects.all())
Esempio n. 27
0
class UserForm(FieldSetModelFormMixin):
    usuario = ModelChoiceField(name="", model="", queryset=User.objects.all())