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.
Sistema Hospitalario OSIRIS
Sistema para la administracion de hospitales, almacenes, facturacion, laboratorio, farmacia, registro en linea de cargos realizdos a paciente, separacion de paquetes, caja, tesoreria, etc.
martes, 15 de diciembre de 2020
Totalizado por Numero de Atencion
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
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
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();
}
}
}
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();
}
}
}
Suscribirse a:
Entradas (Atom)