Commit 41f7e15e by SIAP

El módulo de LABORATORIO, esta orientado al registro de las solicitudes e…

El módulo de LABORATORIO, esta orientado al registro de las solicitudes e ingreso de los resultados de examenes de los pacientes en cada establecimeinto de salud registrando los ingresos desde la Recepción del Laboratorio o desdes las diferentes servicios con que cuente el establecimiento y las salidas que son los reportes  y consultade los resultados de los pacientes en linea.

* Ingreso de solicitudes: Ingreso de solicitudes desde la recepción de laboratorio o desde los diferenten servicios en donde el personal medico indica las pruebas a realizar.
* Resultados de Examenes: Estas salidas se registran ya se por medio de solicitudes indicadas por el personal medico en los diferentes servicios o programas para poder diagnosticar al paciente.
* Tabulador mensual: Con el registro de las solicitudes y las salidas de los resultados se puede llevar el control de las pruebas realizadas diariamente.
parents
Showing with 2800 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

[Dolphin]
Timestamp=2019,6,13,8,18,43
Version=3
[Settings]
HiddenFilesShown=true
#Archivos de conexion a la base de datos
Conexion/*
LAB/Reportes/ReporteTabulador/DBManager.php
scripts/produccion/configuracion.php
#Omitiendo Reportes
Reportes/*.ods
Reportes/*.pdf
Reportes1/*.ods
Reportes1/*.pdf
#Archivos Thumbs
Thumbs.db
#Archivos de respaldo
*~
/nbproject/private/
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
* Image_Barcode2 class
*
* Package to render barcodes
*
* PHP versions 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
* @package Image_Barcode2
* @author Marcelo Subtil Marcal <msmarcal@php.net>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Image_Barcode2
*/
require_once 'Image/Barcode2/Writer.php';
require_once 'Image/Barcode2/Driver.php';
require_once 'Image/Barcode2/Exception.php';
/**
* Image_Barcode2 class
*
* Package which provides a method to create barcode using GD library.
*
* @category Image
* @package Image_Barcode2
* @author Marcelo Subtil Marcal <msmarcal@php.net>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
* @link http://pear.php.net/package/Image_Barcode2
*/
class Image_Barcode2
{
/**
* Image type
*/
const IMAGE_PNG = 'png';
const IMAGE_GIF = 'gif';
const IMAGE_JPEG = 'jpg';
/**
* Barcode type
*/
const BARCODE_CODE39 = 'code39';
const BARCODE_INT25 = 'int25';
const BARCODE_EAN13 = 'ean13';
const BARCODE_UPCA = 'upca';
const BARCODE_CODE128 = 'code128';
const BARCODE_EAN8 = 'ean8';
const BARCODE_POSTNET = 'postnet';
/**
* Draws a image barcode
*
* @param string $text A text that should be in the image barcode
* @param string $type The barcode type. Supported types:
* code39 - Code 3 of 9
* int25 - 2 Interleaved 5
* ean13 - EAN 13
* upca - UPC-A
* code128
* ean8
* postnet
* @param string $imgtype The image type that will be generated
* (gif, jpg, png)
* @param boolean $bSendToBrowser if the image shall be outputted to the
* browser, or be returned.
* @param integer $height The image height
* @param integer $width The image width
*
* @return resource The corresponding gd image resource
*
* @throws Image_Barcode2_Exception
* @access public
*
* @author Marcelo Subtil Marcal <msmarcal@php.net>
* @since Image_Barcode2 0.3
*/
public static function draw($text,
$type = Image_Barcode2::BARCODE_INT25,
$imgtype = Image_Barcode2::IMAGE_PNG,
$bSendToBrowser = true,
$height = 10,
$width = 1
) {
//Make sure no bad files are included
if (!preg_match('/^[a-zA-Z0-9]+$/', $type)) {
throw new Image_Barcode2_Exception('Invalid barcode type ' . $type);
}
if (!include_once 'Image/Barcode2/Driver/' . ucfirst($type) . '.php') {
throw new Image_Barcode2_Exception($type . ' barcode is not supported');
}
$classname = 'Image_Barcode2_Driver_' . ucfirst($type);
$obj = new $classname(new Image_Barcode2_Writer());
if (!$obj instanceof Image_Barcode2_Driver) {
throw new Image_Barcode2_Exception(
"'$classname' does not implement Image_Barcode2_Driver"
);
}
if (!$obj instanceof Image_Barcode2_DualWidth) {
$obj->setBarcodeWidth($width);
}
if (!$obj instanceof Image_Barcode2_DualHeight) {
$obj->setBarcodeHeight($height);
}
$obj->setBarcode($text);
$obj->validate();
$img = $obj->draw();
if ($bSendToBrowser) {
// Send image to browser
switch ($imgtype) {
case self::IMAGE_GIF:
header('Content-type: image/gif');
imagegif($img);
imagedestroy($img);
break;
case self::IMAGE_JPEG:
header('Content-type: image/jpg');
imagejpeg($img);
imagedestroy($img);
break;
default:
header('Content-type: image/png');
imagepng($img);
imagedestroy($img);
break;
}
}
return $img;
}
}
<?php
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
* Image_Barcode2_Common class
*
* Common code
*
* PHP versions 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
* @package Image_Barcode2
* @author Ryan Briones <ryanbriones@webxdesign.org>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Image_Barcode2
*/
/**
* Image_Barcode2_Common class
*
* Common code
*
* @category Image
* @package Image_Barcode2
* @author Ryan Briones <ryanbriones@webxdesign.org>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
* @link http://pear.php.net/package/Image_Barcode2
*/
class Image_Barcode2_Common
{
protected $barcodeheight;
protected $barcodewidth;
protected $barcodethinwidth;
protected $barcodethickwidth;
protected $fontsize = 2;
/**
* @var Image_Barcode2_Writer
*/
protected $writer;
/**
* @var string barcode
*/
protected $barcode;
/**
* Class constructor
*
* @param Image_Barcode2_Writer $writer Library to use.
*/
public function __construct(Image_Barcode2_Writer $writer)
{
$this->setWriter($writer);
}
/**
* Set the image rendering library.
*
* @param Image_Barcode2_Writer $writer Library to use.
*
* @return void
*/
public function setWriter(Image_Barcode2_Writer $writer)
{
$this->writer = $writer;
}
/**
* Get the image rendering library.
*
* @return Image_Barcode2_Writer
*/
public function getWriter()
{
return $this->writer;
}
/**
* Set the barcode
*
* @param string $barcode barcode
*
* @return void
*/
public function setBarcode($barcode)
{
$this->barcode = trim($barcode);
}
/**
* Get the barcode
*
* @return string
*/
public function getBarcode()
{
return $this->barcode;
}
public function setFontSize($size)
{
$this->fontsize = $size;
}
public function getFontSize()
{
return $this->fontsize;
}
public function setBarcodeHeight($height)
{
$this->barcodeheight = $height;
}
public function getBarcodeHeight()
{
return $this->barcodeheight;
}
public function setBarcodeWidth($width)
{
$this->barcodewidth = $width;
}
public function getBarcodeWidth()
{
return $this->barcodewidth;
}
public function setBarcodeWidthThick($width)
{
$this->barcodethickwidth = $width;
}
public function getBarcodeWidthThick()
{
return $this->barcodethickwidth;
}
public function setBarcodeWidthThin($width)
{
$this->barcodethinwidth = $width;
}
public function getBarcodeWidthThin()
{
return $this->barcodethinwidth;
}
}
<?php
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
* Image_Barcode2_Driver interface
*
* Driver code
*
* PHP versions 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
* @package Image_Barcode2
* @author Ryan Briones <ryanbriones@webxdesign.org>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Image_Barcode2
*/
/**
* Image_Barcode2_Driver interface
*
* Driver code
*
* @category Image
* @package Image_Barcode2
* @author Ryan Briones <ryanbriones@webxdesign.org>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
* @link http://pear.php.net/package/Image_Barcode2
*/
interface Image_Barcode2_Driver
{
/**
* Draws a barcode
*
* @return resource The corresponding image barcode
*/
public function draw();
/**
* Set the image rendering library.
*
* @param Image_Barcode2_Writer $writer Library to use.
*
* @return void
*/
public function setWriter(Image_Barcode2_Writer $writer);
/**
* Set barcode
*
* @param string $barcode barcode
*
* @return void
*/
public function setBarcode($barcode);
/**
* Validate barcode
*
* @return void
* @throws Image_Barcode2_Exception
*/
public function validate();
}
<?php
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
* Image_Barcode2_Driver_Code39 class
*
* Image_Barcode2_Code39 creates Code 3 of 9 ( Code39 ) barcode images.
* It's implementation borrows heavily for the perl module GD::Barcode::Code39
*
* PHP versions 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
* @package Image_Barcode2
* @author Ryan Briones <ryanbriones@webxdesign.org>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Image_Barcode2
*/
require_once 'Image/Barcode2/Driver.php';
require_once 'Image/Barcode2/Common.php';
require_once 'Image/Barcode2/DualWidth.php';
require_once 'Image/Barcode2/Exception.php';
/**
* Code 3 of 9
*
* Package which provides a method to create Code 3 of 9 using GD library.
*
* @category Image
* @package Image_Barcode2
* @author Ryan Briones <ryanbriones@webxdesign.org>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
* @link http://pear.php.net/package/Image_Barcode2
* @since Image_Barcode2 0.5
*/
class Image_Barcode2_Driver_Code39 extends Image_Barcode2_Common implements Image_Barcode2_Driver, Image_Barcode2_DualWidth
{
/**
* Coding map
* @var array
*/
private $_codingmap = array(
'0' => '000110100',
'1' => '100100001',
'2' => '001100001',
'3' => '101100000',
'4' => '000110001',
'5' => '100110000',
'6' => '001110000',
'7' => '000100101',
'8' => '100100100',
'9' => '001100100',
'A' => '100001001',
'B' => '001001001',
'C' => '101001000',
'D' => '000011001',
'E' => '100011000',
'F' => '001011000',
'G' => '000001101',
'H' => '100001100',
'I' => '001001100',
'J' => '000011100',
'K' => '100000011',
'L' => '001000011',
'M' => '101000010',
'N' => '000010011',
'O' => '100010010',
'P' => '001010010',
'Q' => '000000111',
'R' => '100000110',
'S' => '001000110',
'T' => '000010110',
'U' => '110000001',
'V' => '011000001',
'W' => '111000000',
'X' => '010010001',
'Y' => '110010000',
'Z' => '011010000',
'-' => '010000101',
'*' => '010010100',
'+' => '010001010',
'$' => '010101000',
'%' => '000101010',
'/' => '010100010',
'.' => '110000100',
' ' => '011000100'
);
/**
* Class constructor
*
* @param Image_Barcode2_Writer $writer Library to use.
*/
public function __construct(Image_Barcode2_Writer $writer)
{
parent::__construct($writer);
$this->setBarcodeHeight(50);
$this->setBarcodeWidthThin(1);
$this->setBarcodeWidthThick(3);
}
/**
* Validate barcode
*
* @return void
* @throws Image_Barcode2_Exception
*/
public function validate()
{
// Check barcode for invalid characters
if (preg_match("/[^0-9A-Z\-*+\$%\/. ]/", $this->getBarcode())) {
throw new Image_Barcode2_Exception('Invalid barcode');
}
}
/**
* Make an image resource using the GD image library
*
* @return resource The Barcode Image (TM)
*
* @author Ryan Briones <ryanbriones@webxdesign.org>
*/
public function draw()
{
$text = $this->getBarcode();
$writer = $this->getWriter();
$fontsize = $this->getFontSize();
// add start and stop * characters
$final_text = '*' . $text . '*';
$barcode = '';
foreach (str_split($final_text) as $character) {
$barcode .= $this->_dumpCode($this->_codingmap[$character] . '0');
}
$barcode_len = strlen($barcode);
// Create GD image object
$img = $writer->imagecreate($barcode_len, $this->getBarcodeHeight());
// Allocate black and white colors to the image
$black = $writer->imagecolorallocate($img, 0, 0, 0);
$white = $writer->imagecolorallocate($img, 255, 255, 255);
$font_height = $writer->imagefontheight($fontsize);
$font_width = $writer->imagefontwidth($fontsize);
// fill background with white color
$writer->imagefill($img, 0, 0, $white);
// Initialize X position
$xpos = 0;
// draw barcode bars to image
foreach (str_split($barcode) as $character_code) {
if ($character_code == 0) {
$writer->imageline(
$img,
$xpos,
0,
$xpos,
$this->getBarcodeHeight() - $font_height - 1,
$white
);
} else {
$writer->imageline(
$img,
$xpos,
0,
$xpos,
$this->getBarcodeHeight() - $font_height - 1,
$black
);
}
$xpos++;
}
// draw text under barcode
$writer->imagestring(
$img,
$fontsize,
($barcode_len - $font_width * strlen($text)) / 2,
$this->getBarcodeHeight() - $font_height,
$text,
$black
);
return $img;
}
/**
* _dumpCode is a PHP implementation of dumpCode from the Perl module
* GD::Barcode::Code39. I royally screwed up when trying to do the thing
* my own way the first time. This way works.
*
* @param string $code Code39 barcode code
*
* @return string $result barcode line code
* @access private
* @author Ryan Briones <ryanbriones@webxdesign.org>
*/
private function _dumpCode($code)
{
$result = '';