lunes, 18 de mayo de 2026

rust + tauri + react + postgresql

 

Esta combinación es una opción sólida y eficiente para crear aplicaciones de escritorio modernas, destacando por su alto rendimiento y tamaño de paquete reducido en comparación con alternativas como Electron. 

  • Rendimiento y Eficiencia: Tauri utiliza el sistema operativo para la interfaz web, lo que resulta en una aplicación mucho más ligera. Rust maneja la lógica backend y el acceso a PostgreSQL de forma segura y rápida, mientras que React ofrece una interfaz de usuario rica y una gran comunidad de componentes. 

  • Experiencia de Desarrollo: Es ideal si ya tienes conocimientos de desarrollo web (React/JavaScript/TypeScript) pero buscas mejorar el rendimiento y la seguridad de la capa de sistema. Sin embargo, introduce la complejidad de mantener dos ecosistemas y lenguajes diferentes (Rust y JS/TS) en el mismo proyecto. 

  • Consideraciones Técnicas: La integración con PostgreSQL requiere manejar la comunicación asíncrona entre el frontend y el backend de Rust, lo cual puede presentar una curva de aprendizaje inicial. Para aplicaciones simples de CRUD, Electron podría ser más fácil de implementar, pero para cálculos pesados o aplicaciones que requieren acceso nativo al sistema, esta pila es superior. 

En resumen, es una arquitectura seria y viable en 2026, especialmente valorada por desarrolladores que priorizan la velocidad, la seguridad y la eficiencia de memoria sin sacrificar la productividad del frontend web.

Modulo de Cotizaciones (Paquetes quirurgicos)

 Se crea un nuevo modulo para poder gestionar las cotizaciones

 

Continuamos con el Trabajo del Sistema Hospitalario OSIRIS

 Hemos avanzando realizando ajustes en módulos:

  • Gastos y reembolso
  • Mejoras en los Cortes de Caja
  • Integración con APIs
  • Se agregan Reportes en PDF
  • Ajuste de Performace en las consultas de base de datos
  • Mejoras significativas para el control de Honorarios Medicos 

 

viernes, 5 de abril de 2024

Mejoras en Pases de Servicios Medicos

 Se ha realizado una mejora al generar los pases interdepartamentales, estos se enlasan a las habitaciones y/o cubiculos que tiene cada departamento

miércoles, 16 de agosto de 2023

Mejora en el Modulo de Resultados de Laboratorio

 Se sigue trabajando, todos los dias hacemos mejoras, optimizamos y automatizamos procesos.

Estamos trabajando para que los resultados se puedan ver solo escaneando un QR.

viernes, 5 de febrero de 2021

Cambios al Modulo de Edicion de Admision

 Se ha reescrito todo el modulo edicion de admision para darle un orden, se han mejorado los permisos y se ha reestruccturado el fontend.

Los cambios es para llevar de la mano a los usuarios que generan la captura de datos en el sistema

martes, 15 de diciembre de 2020

Totalizado por Numero de Atencion

 Se ha creado un modulo el cual totaliza los cargos realizados v/s los abonos o pagos que se han realizado, esto es para verificar que la cuenta este cuadrada, esto ayuda para por determinar los ingresos que se generan en las direfentes areas como urgencas/Hospital/Quirofano, etc.

martes, 20 de octubre de 2020

Creacion de Hojas de Calculo XLSX

 Se ha portado la clase de .ODS para poder crear .XLSX

Estamos usando la libreria EPPlus para C#

 

con esta simple llamada 

new osiris.class_traslate_xlsx(query_sql, args_names_field, "VISITAS/HONORARIOS MEDICOS");

y con sus respectivos parametros


martes, 3 de diciembre de 2019

Generacion de Requisicion Automatica

Se podra crear una requisicion automatica solo con la salida de materiales se analizara el consumo, con esta herramienta se facilitara la captura de conceptos a la hora de generar la requisicion

martes, 15 de octubre de 2019

AJUSTES VARIOS

Se han realizado varios ajustes, para mejorar los procesos de operacion

jueves, 19 de septiembre de 2019

AUTOMATIZACION DE PROCESO


Se han automatizado varios procesos para hacer mas fácil el sistema, se creo un nuevo modulo de admisión ambulatoria, que facilita el ingreso de pacientes desde la agenda

lunes, 17 de diciembre de 2018

Traspado de reportes a PDF y el uso de Mini Printer

Hola

A todos

Se han agregado, mas mejoras asi mismo se puede usar una miniprinter para el modulo de Caja

Saludos

lunes, 8 de mayo de 2017

Create ODS spreadsheets C# Usin AODL + Query PostgreSQL

Library

using System;
using System.Data;  
using AODL;
using AODL.Document.SpreadsheetDocuments;
using AODL.Document.Content;
using AODL.Document.Content.Tables;
using AODL.Document;
using AODL.Package;
using AODL.Document.Collections;



string query_sql = "SELECT id_producto, description FROM products";


string[,] args_names_field = {
            {"Item", "item","1.5","",""},
            {"SKU","string","2.6","
id_producto",""},
            {"Producto","string","12","
description",""},
};
     new seshat.class_traslate_ods(query_sql+query_sql_grupo+query_sql_grupo1+query_sql_grupo2+ordern_lista,args_names_field,"CATALOGO DE PRODUCTOS");
 


          public class_traslate_ods (string query_sql,string[,] args_colums,string titulo_reporte)
        {
            connectionString = conexion_a_DB._url_servidor+conexion_a_DB._port_DB+conexion_a_DB._usuario_DB+conexion_a_DB._passwrd_user_DB;
            nombrebd = conexion_a_DB._nombrebd;
            int secuencia_req = 0;
            int files_field = 0;
                                  
            //Create new spreadsheet open document (.ods)
            AODL.Document.SpreadsheetDocuments.SpreadsheetDocument spreadsheetDocument = new AODL.Document.SpreadsheetDocuments.SpreadsheetDocument();
            spreadsheetDocument.New();
            AODL.Document.Content.Tables.Table table = new AODL.Document.Content.Tables.Table(spreadsheetDocument, "hoja1", "tablefirst");
            NpgsqlConnection conexion;
            conexion = new NpgsqlConnection (connectionString+nombrebd);
            // Verifica que la base de datos este conectada
            try{
                // creando el titulo del reporte
                string text;
                AODL.Document.Content.Tables.Cell cell;
                cell = table.CreateCell ();
                //cell.OfficeValueType ="float";
                AODL.Document.Content.Text.Paragraph paragraph;

                paragraph = new AODL.Document.Content.Text.Paragraph (spreadsheetDocument);
                text = titulo_reporte;          
                paragraph.TextContent.Add (new AODL.Document.Content.Text.SimpleText (spreadsheetDocument, text));
                cell.Content.Add (paragraph);
                cell.OfficeValueType = "string";
                cell.OfficeValue = text;
                //cell.StyleName = cell.CellStyle.CellProperties.
                table.InsertCellAt (files_field, 0, cell);
                files_field++;

                cell = table.CreateCell ();
                //cell.OfficeValueType ="float";
                paragraph = new AODL.Document.Content.Text.Paragraph (spreadsheetDocument);
                text = "";          
                paragraph.TextContent.Add (new AODL.Document.Content.Text.SimpleText (spreadsheetDocument, text));
                cell.Content.Add (paragraph);
                cell.OfficeValueType = "string";
                cell.OfficeValue = text;
                //cell.StyleName = cell.CellStyle.CellProperties.
                table.InsertCellAt (files_field, 0, cell);
                files_field++;

                // Creando los nombres de ancabezado de los campos  
                for (int colum_field = 0; colum_field <= args_colums.GetUpperBound (0); colum_field++) {
                    cell = table.CreateCell ();
                    //cell.OfficeValueType ="float";
                    paragraph = new AODL.Document.Content.Text.Paragraph(spreadsheetDocument);
                    //AODL.Document.Content.Text.FormatedText formText;
                    //formText.TextStyle.TextProperties.Bold();
                    text = args_colums[ colum_field, 0 ];          
                    paragraph.TextContent.Add(new AODL.Document.Content.Text.SimpleText(spreadsheetDocument,text));
                    cell.Content.Add(paragraph);
                    cell.OfficeValueType = "string";                          
                    cell.OfficeValue = text;
                    //cell.StyleName = cell.CellStyle.CellProperties.
                    table.InsertCellAt (files_field, colum_field, cell);
                    //table.ColumnCollection[colum_field].ColumnStyle.StyleName = "bold";

                    // ancho de la columnas
                    if (args_colums [colum_field, 2] != "") {
                        table.ColumnCollection[colum_field].ColumnStyle.ColumnProperties.Width = args_colums [colum_field, 2]+"cm";
                    }
                }
                files_field++;

                conexion.Open ();
                NpgsqlCommand comando;
                comando = conexion.CreateCommand ();
                comando.CommandText = query_sql;
                //Console.WriteLine(comando.CommandText);
                comando.ExecuteNonQuery();    comando.Dispose();
                NpgsqlDataReader lector = comando.ExecuteReader ();
                while (lector.Read()){
                    secuencia_req ++;
                    for (int colum_field = 0; colum_field <= args_colums.GetUpperBound (0); colum_field++) {
                        cell = table.CreateCell ();
                        //cell.OfficeValueType ="float";
                        paragraph = new AODL.Document.Content.Text.Paragraph(spreadsheetDocument);
                        //AODL.Document.Content.Text.FormatedText formText;
                        //formText.TextStyle.TextProperties.Bold();
                        if(args_colums[ colum_field, 3 ] != ""){
                            text = lector[(string) args_colums[ colum_field, 3 ]].ToString();
                            cell.OfficeValueType = args_colums[ colum_field, 1 ];
                        }else{                          
                            if (args_colums [colum_field, 1] == "item") {
                                text = secuencia_req.ToString().Trim();
                                cell.OfficeValueType = "float";
                            }else{
                                text = "";
                            }
                        }
                        //text = lector[(string) args_names_field[ colum_field ]].ToString().Trim();
                        paragraph.TextContent.Add(new AODL.Document.Content.Text.SimpleText(spreadsheetDocument,text));
                        cell.Content.Add(paragraph);                                                  
                        cell.OfficeValue = text;
                        //cell.StyleName = cell.CellStyle.CellProperties.
                        table.InsertCellAt (files_field, colum_field, cell);
                        //table.ColumnCollection[colum_field].ColumnStyle.StyleName = "bold";
                    }
                    files_field++;
                }
                // activando las formulas
                for (int colum_field = 0; colum_field <= args_colums.GetUpperBound (0); colum_field++) {
                    if (args_colums [colum_field, 4] != "") {
                        cell = table.CreateCell ();
                        paragraph = new AODL.Document.Content.Text.Paragraph(spreadsheetDocument);              
                        cell.Content.Add(paragraph);
                        cell.OfficeValueType = args_colums[ colum_field, 1 ];
                        //   ---cell1.OfficeValue = text;
                        cell.Formula = args_colums[ colum_field, 4 ]+files_field+")";
                        table.InsertCellAt (files_field, colum_field, cell);
                        //Console.WriteLine("{0}, {1}", args_formulas[i,0], args_formulas[i,1]);  
                    }
                }
                conexion.Close();              
                //Insert table into the spreadsheet document
                spreadsheetDocument.TableCollection.Add(table);
                string ods_name = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".ods";
                spreadsheetDocument.SaveTo(ods_name);
                try{
                    // open the document automatic
                    System.Diagnostics.Process.Start(ods_name);
                }catch(Exception ex){
                    MessageDialog msgBoxError = new MessageDialog (MyWinError,DialogFlags.DestroyWithParent,
                                            MessageType.Error,
                                            ButtonsType.Close,"Open error file: {0}",ex.Message);
                    msgBoxError.Run ();        msgBoxError.Destroy();
                }
            }catch(NpgsqlException ex){
                    MessageDialog msgBoxError = new MessageDialog (MyWinError,DialogFlags.DestroyWithParent,
                                    MessageType.Error,
                                    ButtonsType.Close,"PostgresSQL error: {0}",ex.Message);
                    msgBoxError.Run ();        msgBoxError.Destroy();
            }
        }      
    }

jueves, 2 de marzo de 2017

Creacion de un TreeView GTK# (Create treeview GTK# C-Sharp)

Buen Dia Amigos

Aca del dejo como crear un TreeView en GKT#, bajo monodevelop 5.10 Linux aunque tambien funciona para Xamarin Studio sin problemas

Librerias a Usar

using System;
using Gtk;
using Gdk;
using Glade;
using Npgsql;
using System.Collections;
using System.Data;
using System.Collections.Generic;







Llamada del scrip

Explicacion del arreglo

{ "Cant.", "text","","","","","true"},

0 titulo
1 tipo de la columna
2 ancho de la columna
3 R   Color
4 G   Color
5 B   Color
6 true visualiza columna   false oculta columna


void crea_treeview()
        {
           
object[] parametros = { treeview_concepto_remis,treeViewEngineconcepremis};
            string[,] coltreeview = {
                { "Cant.", "text","","","","","true"},
                { "Ref.", "text","","","","","true" },
                { "Descripcion", "text","400","","","","true" },
                { "Pre. Unitario", "text","","","","","true" },
                { "Total", "text","","","","","true" },
                { "Lote", "text","100","","","","true" },
                { "Caducidad", "text","80","","","","true" },
                { "Cod. Barra", "text","","","","","true" },
                { "Ref.", "text","","","","","true" },
                { "ID Producto", "text","","","","","true" },
                { "Nro.remision", "text","","","","","false" }
            };
            crea_colums_treeview (parametros, coltreeview,"treeview_concepto_remis");

}


Como se crea automaticamente las columnas del TreeView

void crea_colums_treeview(object[] args,string [,] args_colums,string nombre_treeview_)
        {
            //var columns_renderertext = new List();
            //var columns_renderertoggle = new List();
            Gtk.CellRendererText text;
            Gtk.CellRendererToggle toggle;
            Gtk.TreeView treeviewobject = null;
            Gtk.ListStore treeViewEngine = null;
            ArrayList columns = new ArrayList ();

            treeviewobject = (object) args[0] as Gtk.TreeView;
            treeViewEngine = (object) args[1] as Gtk.ListStore;

            var columns_treeview = new List();

            foreach (TreeViewColumn tvc in treeviewobject.Columns)
                treeviewobject.RemoveColumn(tvc);

            Type[] t = new Type[args_colums.GetUpperBound (0)+1];
            for (int colum_field = 0; colum_field <= args_colums.GetUpperBound (0); colum_field++) {
                if ((string)args_colums [colum_field, 1] == "text") {
                    t [colum_field] = typeof(string);
                }
                if ((string)args_colums [colum_field, 1] == "toogle") {
                    t [colum_field] = typeof(bool);
                }
            }
            treeViewEngine = new Gtk.ListStore(t);
            //treeViewEngine = liststore_;
            treeviewobject.Model = treeViewEngine;
            treeviewobject.RulesHint = true;
            //treeviewobject.Selection.Mode = SelectionMode.Multiple;
            if (args_colums.GetUpperBound (0) >= 0) {
                for (int colum_field = 0; colum_field <= args_colums.GetUpperBound (0); colum_field++) {
                    if ((string)args_colums [colum_field, 0] != "") {
                        if ((string)args_colums [colum_field, 1] == "text") {
                            // column for holiday names
                            text = new CellRendererText ();
                            text.Xalign = 0.0f;
                            columns.Add (text);
                            columns_treeview.Add (new TreeViewColumn ((string)args_colums [colum_field, 0], text, "text", colum_field));
                            //columns_renderertext.Add (new CellRendererText ()); 
                            //columns_renderertext [colum_field+1].Xalign = 0.0f;
                            //columns.Add (columns_renderertext [colum_field+1]);
                            //columns_treeview.Add (new TreeViewColumn ((string)args_colums [colum_field, 0], columns_renderertext [colum_field], "text", colum_field));
                            // ancho de la columna
                            if ((string) args_colums [colum_field, 2] != "") {
                                text.Width = int.Parse((string) args_colums [colum_field, 2]);
                            }
                            // color de la columna
                            if ((string) args_colums [colum_field, 3] != "") {
                                text.CellBackgroundGdk = new Gdk.Color (byte.Parse((string) args_colums [colum_field, 3]), byte.Parse((string) args_colums [colum_field, 4]), byte.Parse((string) args_colums [colum_field, 5]));
                            }
                            if (nombre_treeview_ == "treeview_concepto_remis"){
                                if(colum_field == 0) {
                                    text.Editable = true;
                                    text.Edited += NumberCellEdited_cantremis;
                                }
                                if(colum_field == 2) {
                                    text.Editable = true;
                                    text.Edited += NumberCellEdited_concepto;
                                }
                                if(colum_field == 3) {
                                    text.Editable = true;
                                    text.Edited += NumberCellEdited_precioremis;
                                }
                                if(colum_field == 5) {
                                    text.Editable = true;
                                    text.Edited += NumberCellEdited_lote;
                                }
                                if(colum_field == 6) {
                                    text.Editable = true;
                                    text.Edited += NumberCellEdited_caducidad;
                                }
                            }
                        }
                        if ((string)args_colums [colum_field, 1] == "toogle") {
                            // column for holiday names
                            toggle = new CellRendererToggle ();
                            toggle.Xalign = 0.0f;
                            columns.Add (toggle);
                            columns_treeview.Add (new TreeViewColumn ((string)args_colums [colum_field, 0], toggle, "active", colum_field));
                            //columns_renderertoggle.Add(new CellRendererToggle());
                            //columns_renderertoggle[colum_field].Xalign = 0.0f;
                            //columns.Add (columns_renderertoggle[colum_field]);
                            //columns_treeview.Add (new TreeViewColumn ((string)args_colums [colum_field, 0], columns_renderertoggle[colum_field], "active", colum_field));
                            //toggle.Toggled += new ToggledHandler (selecciona_fila);
                            // ancho de la columna
                            if ((string) args_colums [colum_field, 2] != "") {
                                toggle.Width = int.Parse((string) args_colums [colum_field, 2]);
                            }
                            // color de la columna
                            if ((string) args_colums [colum_field, 3] != "") {
                                toggle.CellBackgroundGdk = new Gdk.Color (byte.Parse((string) args_colums [colum_field, 3]), byte.Parse((string) args_colums [colum_field, 4]), byte.Parse((string) args_colums [colum_field, 5]));
                            }
                        }
                        columns_treeview [colum_field].Resizable = true;
                        treeviewobject.InsertColumn (columns_treeview [colum_field], colum_field);
                        columns_treeview [colum_field].Visible = Convert.ToBoolean((string)args_colums [colum_field, 6]);
                    }
                }
                if (nombre_treeview_ == "treeview_concepto_remis"){
                    //treeview_concepto_remis.RowActivated += on_button_ligar_erp_clicked;
                    treeview_concepto_remis = treeviewobject;
                    treeViewEngineconcepremis = treeViewEngine;
                }
                if (nombre_treeview_ == "treeview_lista_remisiones") {
                    treeview_lista_remisiones.RowActivated += on_button_abrirremis_clicked;
                    treeview_lista_remisiones = treeviewobject;
                    treeViewEngineListaRemis = treeViewEngine;
                }
            }
        }

jueves, 8 de diciembre de 2016

Reportes Varios y Estadisticos

Se crearon reportes para:

  1. Consumo total por mes y año (cargos realizados)
  2. Reporte de consumo por pacientes
  3. Reporte de Solicitudes de Laboratorio
  4. Reporte de Solicitudes de Imagenologia
  5. Reporte de Solicitudes de Dietas
  6. Reporte de Admisiones
  7. Reporte de Facturas enlasadas con Ordenes de Compra
  8. Reporte de Requisiciones Generadas
  9. Etc.


Estamos trabajando para que todos estos reportes se pueda exportar a hojas de calculo de tipo LibreOffice (solo algunos estan funcionando)

Saludos

Mejoras en el Expediente Electronico

Se ha mejorado el expediente electronico, se integra SOAP al 100% asi como la toma de signos vitales, ademas estamos trabajando en las visitas medica, interconsulta, anestesia, cirujano y ayudantes para llevar un control de los honorarios medicos e integrarlos a los tabuladore de pago

Hay muchas novedades

Saludos a todos

lunes, 1 de agosto de 2016

Traspaso de reportes a iTextSharp

Se han estado traspasando todos los reportes a itextsharp para darle mas soporte a nuestra version de windows

jueves, 3 de diciembre de 2015

Create Password SHA1 C#

using System.Security.Cryptography;
using System.Text.RegularExpressions;


public string CreatePasswordSHA1(string password)
{
            SHA1CryptoServiceProvider sha1 = new      SHA1CryptoServiceProvider();
            byte[] bs = System.Text.Encoding.UTF8.GetBytes(password);
            bs = sha1.ComputeHash(bs);
            System.Text.StringBuilder s = new System.Text.StringBuilder();
            foreach (byte b in bs){
                s.Append(b.ToString("x2").ToLower());
            }
            return s.ToString();

}

Create Password SHA256 C#

public string CreatePasswordSHA256(string password)
{
            SHA256Managed sha256 = new SHA256Managed();
            byte[] bs = System.Text.Encoding.UTF8.GetBytes(password);
            bs = sha256.ComputeHash(bs);
            System.Text.StringBuilder s = new System.Text.StringBuilder();
            foreach (byte b in bs){
                s.Append(b.ToString("x2").ToLower());
            }
            return s.ToString();           
}

sábado, 23 de mayo de 2015

Migracion a Monodevelop 5.7 sin Glade

Estamos migrado todos los scrip para hacerlo mas compatible con windows y sin tener problemas de compilacion en diferente distribuciones de Linux, ya que al estar trabajando con Glade Monodevelop ya no lo esta soportando porque tiene un IDE para crear ventanas las cuales genera el codigo puro en C# con GTK#, esto tendra ventajas al poder portar la aplicacion sin mayores problemas

Saludos