diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index d7ad741..714b6e8 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -54,58 +54,58 @@ MainSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fConfigurarConexion
TForm diff --git a/Source/GUIBase/uEditorPreview.pas b/Source/GUIBase/uEditorPreview.pas index 853e14a..f331606 100644 --- a/Source/GUIBase/uEditorPreview.pas +++ b/Source/GUIBase/uEditorPreview.pas @@ -165,8 +165,8 @@ type write SetController; property Title: string read GetTitle write SetTitle; property Report: TfrxReport read GetReport; - procedure Print; - procedure Preview; + procedure Print; virtual; + procedure Preview; virtual; procedure LoadFromStream(AStream : TStream); function ExportToFile : String; end; diff --git a/Source/Informes/EtiquetasBlister.fr3 b/Source/Informes/EtiquetasBlister.fr3 new file mode 100644 index 0000000..fc0cbbd --- /dev/null +++ b/Source/Informes/EtiquetasBlister.fr3 @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Modulos/Medicaciones/Controller/uDetallesMedicacionController.pas b/Source/Modulos/Medicaciones/Controller/uDetallesMedicacionController.pas index 6bcec15..4e01787 100644 --- a/Source/Modulos/Medicaciones/Controller/uDetallesMedicacionController.pas +++ b/Source/Modulos/Medicaciones/Controller/uDetallesMedicacionController.pas @@ -3,7 +3,7 @@ unit uDetallesMedicacionController; interface uses - uDADataTable, uBizDetallesMedicacion, uIDataModuleMedicacion, uControllerDetallesArticulos, + uDADataTable, uBizDetallesMedicacion, uIDataModuleMedicaciones, uControllerDetallesArticulos, uBizArticulos, uBizContactos, Classes; const @@ -19,7 +19,7 @@ type TDetallesMedicacionController = class(TControllerDetallesArticulos, IDetallesMedicacionController) private - FDataModule : IDataModuleMedicacion; + FDataModule : IDataModuleMedicaciones; protected procedure AsignarController; override; //Si sobreescribimos este método podremos tener en cuenta otras columnas para el calculo del importe total de un concepto diff --git a/Source/Modulos/Medicaciones/Controller/uMedicacionReportController.pas b/Source/Modulos/Medicaciones/Controller/uMedicacionReportController.pas index a886760..62c4748 100644 --- a/Source/Modulos/Medicaciones/Controller/uMedicacionReportController.pas +++ b/Source/Modulos/Medicaciones/Controller/uMedicacionReportController.pas @@ -3,32 +3,26 @@ unit uMedicacionReportController; interface uses - Classes, SysUtils, uDADataTable, uControllerBase, uIDataModuleMedicacionReport, + Classes, SysUtils, uDADataTable, uControllerBase, uIDataModuleMedicacionesReport, uPacientesController, uMedicacionesController, uDetallesMedicacionController, uBizMedicaciones, uIntegerListUtils; type - IMedicacionReportController = interface(IControllerBase) - ['{9DD34D7A-C396-4DBF-9A16-C060DE111AA8}'] + IMedicacionesReportController = interface(IControllerBase) + ['{133C0962-ED71-4300-B396-484896720EB0}'] procedure Preview(const AListaID : TIntegerList); procedure Print(const AListaID : TIntegerList); - procedure EtiquetasPreview(const AID : integer; Const withRefCliente: Boolean); - procedure EtiquetasPrint(const AID : integer; Const withRefCliente: Boolean); end; - TMedicacionReportController = class(TControllerBase, IMedicacionReportController) + TMedicacionesReportController = class(TControllerBase, IMedicacionesReportController) private - FDataModule : IDataModuleMedicacionReport; + FDataModule : IDataModuleMedicacionesReport; function CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean; - public constructor Create; override; destructor Destroy; override; - procedure Preview(const AListaID : TIntegerList); procedure Print(const AListaID : TIntegerList); - procedure EtiquetasPreview(const AID : integer; const withRefCliente: Boolean); - procedure EtiquetasPrint(const AID : integer; const withRefCliente: Boolean); end; @@ -39,28 +33,28 @@ uses uEditorPreview, uDataModuleMedicaciones, uEditorBase, cxControls, uStringsUtils, uSistemaFunc, uFactuGES_App; -{ TMedicacionReportController } +{ TMedicacionesReportController } -constructor TMedicacionReportController.Create; +constructor TMedicacionesReportController.Create; begin inherited; FDataModule := TDataModuleMedicacion.Create(Nil); end; -function TMedicacionReportController.CreateEditor(const AName: String; +function TMedicacionesReportController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean; begin Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf); end; -destructor TMedicacionReportController.Destroy; +destructor TMedicacionesReportController.Destroy; begin FDataModule := NIL; inherited; end; -procedure TMedicacionReportController.EtiquetasPreview(const AID: integer; const withRefCliente: Boolean); +procedure TMedicacionesReportController.Preview(const AListaID : TIntegerList); var AStream: Binary; AEditor : IEditorMedicacionesPreview; @@ -69,71 +63,15 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetEtiquetas(AID, withRefCliente); + AStream := FDataModule.GetRptMedicaciones(AListaID); try CreateEditor('EditorMedicacionesPreview', IEditorMedicacionesPreview, AEditor); - if Assigned(AEditor) then - try - AEditor.LoadFromStream(AStream); - AEditor.Preview; - finally - AEditor.Release; - end; - finally - FreeAndNil(AStream); - AEditor := Nil; - end; - finally - HideHourglassCursor; - end; -end; - -procedure TMedicacionReportController.EtiquetasPrint(const AID: integer; const withRefCliente: Boolean); -var - AStream: Binary; - AEditor : IEditorMedicacionesPreview; -begin - AEditor := NIL; - - ShowHourglassCursor; - try - AStream := FDataModule.GetEtiquetas(AID, withRefCliente); - try - CreateEditor('EditorMedicacionesPreview', IEditorMedicacionesPreview, AEditor); - if Assigned(AEditor) then - try - AEditor.LoadFromStream(AStream); - AEditor.Print; - finally - AEditor.Release; - end; - finally - FreeAndNil(AStream); - AEditor := Nil; - end; - finally - HideHourglassCursor; - end; -end; - -procedure TMedicacionReportController.Preview(const AListaID : TIntegerList); -var - AStream: Binary; - AEditor : IEditorMedicacionesPreview; -begin -{ AEditor := NIL; - - ShowHourglassCursor; - try - AStream := FDataModule.GetEtiquetas(AListaID); - try - CreateEditor('EditorMedicacionPreview', IEditorMedicacionPreview, AEditor); if Assigned(AEditor) then begin try AEditor.Controller := Self; AEditor.ListaID := AListaID; - AEditor.Title := 'Albarán - ' + AppFactuGES.EmpresaActiva.NOMBRE; + AEditor.Title := 'Medicación - ' + AppFactuGES.EmpresaActiva.NOMBRE; AEditor.LoadFromStream(AStream); AEditor.Preview; finally @@ -146,10 +84,10 @@ begin end; finally HideHourglassCursor; - end; } + end; end; -procedure TMedicacionReportController.Print(const AListaID : TIntegerList); +procedure TMedicacionesReportController.Print(const AListaID : TIntegerList); var AStream: Binary; AEditor : IEditorMedicacionesPreview; diff --git a/Source/Modulos/Medicaciones/Controller/uMedicacionesController.pas b/Source/Modulos/Medicaciones/Controller/uMedicacionesController.pas index 1f023ee..834636c 100644 --- a/Source/Modulos/Medicaciones/Controller/uMedicacionesController.pas +++ b/Source/Modulos/Medicaciones/Controller/uMedicacionesController.pas @@ -5,7 +5,7 @@ interface uses Classes, SysUtils, uDADataTable, uEditorDBItem, - uControllerBase, uIDataModuleMedicacion, uPacientesController, + uControllerBase, uIDataModuleMedicaciones, uPacientesController, uDetallesMedicacionController, uBizMedicaciones; type @@ -40,8 +40,6 @@ type procedure Preview(AMedicacion : IBizMedicacion; AllItems: Boolean = false); procedure Print(AMedicacion : IBizMedicacion; AllItems: Boolean = false); - procedure EtiquetasPreview(AMedicacion : IBizMedicacion; Const withRefPaciente: Boolean); - procedure EtiquetasPrint(AMedicacion : IBizMedicacion; Const withRefPaciente: Boolean); function EsModificable(AMedicacion: IBizMedicacion): Boolean; function EsEliminable(AMedicacion: IBizMedicacion): Boolean; @@ -52,7 +50,7 @@ type TMedicacionesController = class(TControllerBase, IMedicacionesController) protected - FDataModule : IDataModuleMedicacion; + FDataModule : IDataModuleMedicaciones; FPacienteController : IPacientesController; FDetallesController : IDetallesMedicacionController; @@ -104,9 +102,6 @@ type procedure Preview(AMedicacion : IBizMedicacion; AllItems: Boolean = false); procedure Print(AMedicacion : IBizMedicacion; AllItems: Boolean = false); - procedure EtiquetasPreview(AMedicacion : IBizMedicacion; Const withRefPaciente: Boolean); - procedure EtiquetasPrint(AMedicacion : IBizMedicacion; Const withRefPaciente: Boolean); - end; implementation @@ -449,30 +444,6 @@ begin Result := True; end; -procedure TMedicacionesController.EtiquetasPreview(AMedicacion: IBizMedicacion; Const withRefPaciente: Boolean); -var - AReportController : IMedicacionReportController; -begin - AReportController := TMedicacionReportController.Create; - try - AReportController.EtiquetasPreview(AMedicacion.ID, withRefPaciente); - finally - AReportController := NIL; - end; -end; - -procedure TMedicacionesController.EtiquetasPrint(AMedicacion: IBizMedicacion; Const withRefPaciente: Boolean); -var - AReportController : IMedicacionReportController; -begin - AReportController := TMedicacionReportController.Create; - try - AReportController.EtiquetasPrint(AMedicacion.ID, withRefPaciente); - finally - AReportController := NIL; - end; -end; - procedure TMedicacionesController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); var AMedicacion : IBizMedicacion; @@ -564,16 +535,15 @@ end; procedure TMedicacionesController.Preview(AMedicacion: IBizMedicacion; AllItems: Boolean = false); var - AReportController : IMedicacionReportController; + AReportController : IMedicacionesReportController; ID_Medicaciones: TIntegerList; begin - AReportController := TMedicacionReportController.Create; + AReportController := TMedicacionesReportController.Create; ID_Medicaciones := TIntegerList.Create; try - - //Si deseamos previsualizar todos los items del objeto albaran + //Si deseamos previsualizar todos los items del objeto if AllItems then begin with AMedicacion.DataTable do @@ -600,14 +570,14 @@ end; procedure TMedicacionesController.Print(AMedicacion: IBizMedicacion; AllItems: Boolean = false); var - AReportController : IMedicacionReportController; + AReportController : IMedicacionesReportController; ID_Medicaciones: TIntegerList; begin - AReportController := TMedicacionReportController.Create; + AReportController := TMedicacionesReportController.Create; ID_Medicaciones := TIntegerList.Create; try - //Si deseamos previsualizar todos los items del objeto albaran + //Si deseamos previsualizar todos los items del objeto if AllItems then begin with AMedicacion.DataTable do diff --git a/Source/Modulos/Medicaciones/Data/uDataModuleMedicaciones.pas b/Source/Modulos/Medicaciones/Data/uDataModuleMedicaciones.pas index 075178c..bb8b1b5 100644 --- a/Source/Modulos/Medicaciones/Data/uDataModuleMedicaciones.pas +++ b/Source/Modulos/Medicaciones/Data/uDataModuleMedicaciones.pas @@ -7,12 +7,12 @@ uses uRORemoteService, uROClient, uROBinMessage, uDAScriptingProvider, uDACDSDataTable, uROWinInetHttpChannel, uDADataTable, uDABINAdapter, - uIDataModuleMedicacion, uBizMedicaciones, uBizDetallesMedicacion, - uIDataModuleMedicacionReport, uDataModuleBase, uDABin2DataStreamer, uDAMemDataTable, + uIDataModuleMedicaciones, uBizMedicaciones, uBizDetallesMedicacion, + uIDataModuleMedicacionesReport, uDataModuleBase, uDABin2DataStreamer, uDAMemDataTable, uDAInterfaces, uDADataStreamer, uDARemoteDataAdapter, uIntegerListUtils; type - TDataModuleMedicacion = class(TDataModuleBase, IDataModuleMedicacion, IDataModuleMedicacionReport) + TDataModuleMedicacion = class(TDataModuleBase, IDataModuleMedicaciones, IDataModuleMedicacionesReport) RORemoteService: TRORemoteService; rda_Medicacion: TDARemoteDataAdapter; Bin2DataStreamer: TDABin2DataStreamer; @@ -21,10 +21,8 @@ type tbl_Medicacion_Detalles: TDAMemDataTable; ds_Medicacion_Detalles: TDADataSource; procedure DAClientDataModuleCreate(Sender: TObject); - private function _GetDetalles : IBizDetallesMedicacion; - protected procedure AsignarClaseNegocio(AMedicacion: TDADataTable); virtual; @@ -34,7 +32,7 @@ type function NewItem : IBizMedicacion; // Report - function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; + function GetRptMedicaciones(const AListaID: TIntegerList): Binary; end; implementation @@ -81,11 +79,6 @@ begin end; end; -function TDataModuleMedicacion.GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; -begin - Result := (RORemoteService as IsrvMedicacion).GenerarInformeEtiquetas(AID) -end; - function TDataModuleMedicacion.GetItem(const ID: Integer): IBizMedicacion; var Condicion: TDAWhereExpression; @@ -133,4 +126,17 @@ begin end; end; +function TDataModuleMedicacion.GetRptMedicaciones( + const AListaID: TIntegerList): Binary; +var + AParam : TIntegerArray; +begin + AParam := AListaID.ToIntegerArray; + try + Result := (RORemoteService as IsrvMedicacion).GenerarInforme(AParam); + finally + FreeANDNIL(AParam); + end; +end; + end. diff --git a/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacionReport.pas b/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacionReport.pas deleted file mode 100644 index 507a392..0000000 --- a/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacionReport.pas +++ /dev/null @@ -1,16 +0,0 @@ -unit uIDataModuleMedicacionReport; - -interface - -uses - uROTypes, uIntegerListUtils; - -type - IDataModuleMedicacionReport = interface - ['{6A0E016B-A505-4389-9265-C0F711311F14}'] - function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; - end; - -implementation - -end. diff --git a/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacion.pas b/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicaciones.pas similarity index 62% rename from Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacion.pas rename to Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicaciones.pas index 9156dfc..9061915 100644 --- a/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacion.pas +++ b/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicaciones.pas @@ -1,4 +1,4 @@ -unit uIDataModuleMedicacion; +unit uIDataModuleMedicaciones; interface @@ -6,8 +6,8 @@ uses Classes, uBizMedicaciones; type - IDataModuleMedicacion = interface - ['{41C24486-3827-4851-AA9D-F168760F09E0}'] + IDataModuleMedicaciones = interface + ['{E2114887-C8F4-4C69-A2A5-A9F2F4E431BB}'] function GetItems: IBizMedicacion; function GetItem(const ID : Integer) : IBizMedicacion; function NewItem : IBizMedicacion; diff --git a/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacionesReport.pas b/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacionesReport.pas new file mode 100644 index 0000000..2374710 --- /dev/null +++ b/Source/Modulos/Medicaciones/Model/Data/uIDataModuleMedicacionesReport.pas @@ -0,0 +1,16 @@ +unit uIDataModuleMedicacionesReport; + +interface + +uses + uROTypes, uIntegerListUtils; + +type + IDataModuleMedicacionesReport = interface + ['{FB5683D0-BF1B-4FDC-9C96-B9CACC2571D1}'] + function GetRptMedicaciones(const AListaID: TIntegerList): Binary; + end; + +implementation + +end. diff --git a/Source/Modulos/Medicaciones/Model/Medicaciones_model.dpk b/Source/Modulos/Medicaciones/Model/Medicaciones_model.dpk index 4b36eb2..8b8faa6 100644 --- a/Source/Modulos/Medicaciones/Model/Medicaciones_model.dpk +++ b/Source/Modulos/Medicaciones/Model/Medicaciones_model.dpk @@ -40,8 +40,8 @@ requires contains uBizDetallesMedicacion in 'uBizDetallesMedicacion.pas', uBizMedicaciones in 'uBizMedicaciones.pas', - uIDataModuleMedicacionReport in 'Data\uIDataModuleMedicacionReport.pas', - uIDataModuleMedicacion in 'Data\uIDataModuleMedicacion.pas', + uIDataModuleMedicacionesReport in 'Data\uIDataModuleMedicacionesReport.pas', + uIDataModuleMedicaciones in 'Data\uIDataModuleMedicaciones.pas', schMedicacionClient_Intf in 'schMedicacionClient_Intf.pas', schMedicacionServer_Intf in 'schMedicacionServer_Intf.pas'; diff --git a/Source/Modulos/Medicaciones/Model/Medicaciones_model.dproj b/Source/Modulos/Medicaciones/Model/Medicaciones_model.dproj index 5ef726b..592d295 100644 --- a/Source/Modulos/Medicaciones/Model/Medicaciones_model.dproj +++ b/Source/Modulos/Medicaciones/Model/Medicaciones_model.dproj @@ -38,19 +38,19 @@ MainSource - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/Source/Modulos/Medicaciones/Reports/uRptMedicaciones_Server.dfm b/Source/Modulos/Medicaciones/Reports/uRptMedicaciones_Server.dfm new file mode 100644 index 0000000..7bc9da3 --- /dev/null +++ b/Source/Modulos/Medicaciones/Reports/uRptMedicaciones_Server.dfm @@ -0,0 +1,1179 @@ +object RptMedicaciones: TRptMedicaciones + OldCreateOrder = True + OnCreate = DataModuleCreate + OnDestroy = DataModuleDestroy + Height = 494 + Width = 573 + object schReport: TDASchema + ConnectionManager = dmServer.ConnectionManager + DataDictionary = DataDictionary + Datasets = < + item + Params = < + item + Name = 'ID' + DataType = datInteger + Value = '2' + ParamType = daptInput + end> + Statements = < + item + Connection = 'IBX' + SQL = + 'SELECT '#10' V_MEDICACION.ID, V_MEDICACION.ID_PACIENTE, V_MEDICAC' + + 'ION.REFERENCIA,'#10' V_MEDICACION.NOMBRE AS PACIENTE, V_MEDICACIO' + + 'N.NUMERO_SS,'#10' V_MEDICACION.FECHA_DESDE, V_MEDICACION.FECHA_HA' + + 'STA,'#10' EMPRESAS.NOMBRE AS FARMACEUTICO, EMPRESAS.TELEFONO_1 AS' + + ' TELEFONO_FARM,'#10' EMPRESAS.MOVIL_1 AS MOVIL_FARM'#10' FROM'#10' V_' + + 'MEDICACION, EMPRESAS'#10' WHERE V_MEDICACION.ID = :ID'#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID' + TableField = 'ID' + end + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' + end + item + DatasetField = 'ID_PACIENTE' + TableField = 'ID_PACIENTE' + end + item + DatasetField = 'PACIENTE' + TableField = 'PACIENTE' + end + item + DatasetField = 'NUMERO_SS' + TableField = 'NUMERO_SS' + end + item + DatasetField = 'FECHA_DESDE' + TableField = 'FECHA_DESDE' + end + item + DatasetField = 'FECHA_HASTA' + TableField = 'FECHA_HASTA' + end + item + DatasetField = 'FARMACEUTICO' + TableField = 'FARMACEUTICO' + end + item + DatasetField = 'TELEFONO_FARM' + TableField = 'TELEFONO_FARM' + end + item + DatasetField = 'MOVIL_FARM' + TableField = 'MOVIL_FARM' + end> + end> + Name = 'InformeMedicaciones' + Fields = < + item + Name = 'ID' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_ID' + InPrimaryKey = True + end + item + Name = 'ID_PACIENTE' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_ID_PACIENTE' + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_REFERENCIA' + end + item + Name = 'PACIENTE' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_PACIENTE' + end + item + Name = 'NUMERO_SS' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_NUMERO_SS' + end + item + Name = 'FECHA_DESDE' + DataType = datDateTime + DictionaryEntry = 'InformeMedicaciones_FECHA_DESDE' + end + item + Name = 'FECHA_HASTA' + DataType = datDateTime + DictionaryEntry = 'InformeMedicaciones_FECHA_HASTA' + end + item + Name = 'FARMACEUTICO' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_FARMACEUTICO' + end + item + Name = 'TELEFONO_FARM' + DataType = datString + Size = 25 + DictionaryEntry = 'InformeMedicaciones_TELEFONO_FARM' + end + item + Name = 'MOVIL_FARM' + DataType = datString + Size = 25 + DictionaryEntry = 'InformeMedicaciones_MOVIL_FARM' + end> + ReadOnly = True + end + item + Params = < + item + Name = 'ID_MEDICACION' + Value = '2' + end> + Statements = < + item + Connection = 'IBX' + SQL = + 'SELECT '#10' ID, ID_MEDICACION, POSICION, TIPO_DETALLE, ID_ARTICU' + + 'LO, '#10' REFERENCIA, CONCEPTO, CANTIDAD, POSOLOGIA, FORMA_COLOR,' + + ' '#10' LOTE, VISIBLE'#10' FROM'#10' MEDICACION_DETALLES'#10' WHERE (ID_M' + + 'EDICACION = :ID_MEDICACION) AND'#10' (TIPO_DETALLE = '#39'En blis' + + 'ter'#39')'#10' ORDER BY POSICION'#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID' + TableField = 'ID' + end + item + DatasetField = 'POSICION' + TableField = 'POSICION' + end + item + DatasetField = 'TIPO_DETALLE' + TableField = 'TIPO_DETALLE' + end + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' + end + item + DatasetField = 'CONCEPTO' + TableField = 'CONCEPTO' + end + item + DatasetField = 'CANTIDAD' + TableField = 'CANTIDAD' + end + item + DatasetField = 'VISIBLE' + TableField = 'VISIBLE' + end + item + DatasetField = 'ID_MEDICACION' + TableField = 'ID_MEDICACION' + end + item + DatasetField = 'ID_ARTICULO' + TableField = 'ID_ARTICULO' + end + item + DatasetField = 'POSOLOGIA' + TableField = 'POSOLOGIA' + end + item + DatasetField = 'FORMA_COLOR' + TableField = 'FORMA_COLOR' + end + item + DatasetField = 'LOTE' + TableField = 'LOTE' + end> + end> + Name = 'InformeMedicaciones_DetallesEnBlister' + Fields = < + item + Name = 'ID' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID' + InPrimaryKey = True + end + item + Name = 'ID_MEDICACION' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID_MEDICACION' + end + item + Name = 'POSICION' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_POSICION' + end + item + Name = 'TIPO_DETALLE' + DataType = datString + Size = 25 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_TIPO_DETALLE' + end + item + Name = 'ID_ARTICULO' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID_ARTICULO' + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_REFERENCIA' + end + item + Name = 'CONCEPTO' + DataType = datString + Size = 2000 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_CONCEPTO' + end + item + Name = 'CANTIDAD' + DataType = datCurrency + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_CANTIDAD' + end + item + Name = 'POSOLOGIA' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_POSOLOGIA' + end + item + Name = 'FORMA_COLOR' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_FORMA_COLOR' + end + item + Name = 'LOTE' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_LOTE' + end + item + Name = 'VISIBLE' + DataType = datSmallInt + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_VISIBLE' + end> + ReadOnly = True + end + item + Params = < + item + Name = 'ID_MEDICACION' + Value = '2' + end> + Statements = < + item + Connection = 'IBX' + SQL = + 'SELECT '#10' ID, ID_MEDICACION, POSICION, TIPO_DETALLE, ID_ARTICU' + + 'LO, '#10' REFERENCIA, CONCEPTO, CANTIDAD, POSOLOGIA, FORMA_COLOR,' + + ' '#10' LOTE, VISIBLE'#10' FROM'#10' MEDICACION_DETALLES'#10' WHERE (ID_M' + + 'EDICACION = :ID_MEDICACION) AND'#10' (TIPO_DETALLE = '#39'Fuera d' + + 'el blister'#39')'#10' ORDER BY POSICION'#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID' + TableField = 'ID' + end + item + DatasetField = 'POSICION' + TableField = 'POSICION' + end + item + DatasetField = 'TIPO_DETALLE' + TableField = 'TIPO_DETALLE' + end + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' + end + item + DatasetField = 'CONCEPTO' + TableField = 'CONCEPTO' + end + item + DatasetField = 'CANTIDAD' + TableField = 'CANTIDAD' + end + item + DatasetField = 'VISIBLE' + TableField = 'VISIBLE' + end + item + DatasetField = 'ID_MEDICACION' + TableField = 'ID_MEDICACION' + end + item + DatasetField = 'ID_ARTICULO' + TableField = 'ID_ARTICULO' + end + item + DatasetField = 'POSOLOGIA' + TableField = 'POSOLOGIA' + end + item + DatasetField = 'FORMA_COLOR' + TableField = 'FORMA_COLOR' + end + item + DatasetField = 'LOTE' + TableField = 'LOTE' + end> + end> + Name = 'InformeMedicaciones_DetallesFueraDeBlister' + Fields = < + item + Name = 'ID' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID' + InPrimaryKey = True + end + item + Name = 'ID_MEDICACION' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID_MEDICACION' + end + item + Name = 'POSICION' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_POSICION' + end + item + Name = 'TIPO_DETALLE' + DataType = datString + Size = 25 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_TIPO_DETALLE' + end + item + Name = 'ID_ARTICULO' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID_ARTICULO' + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_REFERENCIA' + end + item + Name = 'CONCEPTO' + DataType = datString + Size = 2000 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_CONCEPTO' + end + item + Name = 'CANTIDAD' + DataType = datCurrency + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_CANTIDAD' + end + item + Name = 'POSOLOGIA' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_POSOLOGIA' + end + item + Name = 'FORMA_COLOR' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_FORMA_COLOR' + end + item + Name = 'LOTE' + DataType = datString + Size = 255 + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_LOTE' + end + item + Name = 'VISIBLE' + DataType = datSmallInt + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_VISIBLE' + end> + ReadOnly = True + end> + JoinDataTables = <> + UnionDataTables = <> + Commands = <> + RelationShips = <> + UpdateRules = <> + Version = 0 + Left = 40 + Top = 16 + end + object DataDictionary: TDADataDictionary + Fields = < + item + Name = 'InformeMedicaciones_ID' + DataType = datInteger + DisplayLabel = 'ID' + end + item + Name = 'InformeMedicaciones_ID_PACIENTE' + DataType = datInteger + DisplayLabel = 'ID_PACIENTE' + end + item + Name = 'InformeMedicaciones_REFERENCIA' + DataType = datString + Size = 255 + DisplayLabel = 'Referencia' + end + item + Name = 'InformeMedicaciones_PACIENTE' + DataType = datString + Size = 255 + DisplayLabel = 'Paciente' + end + item + Name = 'InformeMedicaciones_NUMERO_SS' + DataType = datString + Size = 255 + DisplayLabel = 'NASS' + end + item + Name = 'InformeMedicaciones_FECHA_DESDE' + DataType = datDateTime + DisplayLabel = 'Desde' + end + item + Name = 'InformeMedicaciones_FECHA_HASTA' + DataType = datDateTime + DisplayLabel = 'Hasta' + end + item + Name = 'InformeMedicaciones_FARMACEUTICO' + DataType = datString + Size = 255 + DisplayLabel = 'Farmac'#233'utico' + end + item + Name = 'InformeMedicaciones_TELEFONO_FARM' + DataType = datString + Size = 25 + DisplayLabel = 'Tel'#233'fono farmac'#233'utico' + end + item + Name = 'InformeMedicaciones_MOVIL_FARM' + DataType = datString + Size = 25 + DisplayLabel = 'M'#243'vil farmac'#233'utico' + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_ID' + DataType = datInteger + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_ID_MEDICACION' + DataType = datInteger + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_POSICION' + DataType = datInteger + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_TIPO_DETALLE' + DataType = datString + Size = 25 + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_ID_ARTICULO' + DataType = datInteger + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_REFERENCIA' + DataType = datString + Size = 255 + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_CONCEPTO' + DataType = datString + Size = 2000 + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_CANTIDAD' + DataType = datCurrency + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_POSOLOGIA' + DataType = datString + Size = 255 + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_FORMA_COLOR' + DataType = datString + Size = 255 + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_LOTE' + DataType = datString + Size = 255 + end + item + Name = 'InformeMedicaciones_DetallesEnBlister_VISIBLE' + DataType = datSmallInt + end> + Left = 38 + Top = 158 + end + object frxDBCabecera: TfrxDBDataset + UserName = 'frxDBCabecera' + CloseDataSource = False + DataSource = DataSource1 + BCDToCurrency = False + Left = 264 + Top = 16 + end + object frxDBDetallesEnBlister: TfrxDBDataset + UserName = 'frxDBDetallesEnBlister' + CloseDataSource = False + DataSource = DataSource2 + BCDToCurrency = False + Left = 360 + Top = 16 + end + object IBDatabase1: TIBDatabase + Connected = True + DatabaseName = 'C:\Codigo farmacia\Output\Debug\Database\FACTUGES.FDB' + Params.Strings = ( + 'user_name=sysdba' + 'password=masterkey' + 'lc_ctype=ISO8859_1') + LoginPrompt = False + DefaultTransaction = IBTransaction1 + Left = 32 + Top = 256 + end + object IBTransaction1: TIBTransaction + Active = True + Left = 32 + Top = 312 + end + object DataSource1: TDataSource + DataSet = cabecera + Left = 200 + Top = 256 + end + object DataSource2: TDataSource + DataSet = detallesenblister + Left = 200 + Top = 312 + end + object cabecera: TIBQuery + Database = IBDatabase1 + Transaction = IBTransaction1 + Active = True + SQL.Strings = ( + 'SELECT ' + + ' V_MEDICACION.ID, V_MEDICACION.ID_PACIENTE, V_MEDICACION.REFE' + + 'RENCIA,' + ' V_MEDICACION.NOMBRE AS PACIENTE, V_MEDICACION.NUMERO_SS,' + ' V_MEDICACION.FECHA_DESDE, V_MEDICACION.FECHA_HASTA,' + + ' EMPRESAS.NOMBRE AS FARMACEUTICO, EMPRESAS.TELEFONO_1 AS TELE' + + 'FONO_FARM,' + ' EMPRESAS.MOVIL_1 AS MOVIL_FARM' + ' FROM' + ' V_MEDICACION, EMPRESAS' + ' WHERE V_MEDICACION.ID = 2') + Left = 120 + Top = 256 + object cabeceraID: TIntegerField + FieldName = 'ID' + Origin = '"V_MEDICACION"."ID"' + end + object cabeceraID_PACIENTE: TIntegerField + FieldName = 'ID_PACIENTE' + Origin = '"V_MEDICACION"."ID_PACIENTE"' + end + object cabeceraREFERENCIA: TIBStringField + FieldName = 'REFERENCIA' + Origin = '"V_MEDICACION"."REFERENCIA"' + Size = 255 + end + object cabeceraPACIENTE: TIBStringField + FieldName = 'PACIENTE' + Origin = '"V_MEDICACION"."NOMBRE"' + Size = 255 + end + object cabeceraNUMERO_SS: TIBStringField + FieldName = 'NUMERO_SS' + Origin = '"V_MEDICACION"."NUMERO_SS"' + Size = 255 + end + object cabeceraFECHA_DESDE: TDateField + FieldName = 'FECHA_DESDE' + Origin = '"V_MEDICACION"."FECHA_DESDE"' + end + object cabeceraFECHA_HASTA: TDateField + FieldName = 'FECHA_HASTA' + Origin = '"V_MEDICACION"."FECHA_HASTA"' + end + object cabeceraFARMACEUTICO: TIBStringField + FieldName = 'FARMACEUTICO' + Origin = '"EMPRESAS"."NOMBRE"' + Size = 255 + end + object cabeceraTELEFONO_FARM: TIBStringField + FieldName = 'TELEFONO_FARM' + Origin = '"EMPRESAS"."TELEFONO_1"' + Size = 25 + end + object cabeceraMOVIL_FARM: TIBStringField + FieldName = 'MOVIL_FARM' + Origin = '"EMPRESAS"."MOVIL_1"' + Size = 25 + end + end + object detallesenblister: TIBQuery + Database = IBDatabase1 + Transaction = IBTransaction1 + SQL.Strings = ( + 'SELECT ' + ' ID, ID_MEDICACION, POSICION, TIPO_DETALLE, ID_ARTICULO, ' + ' REFERENCIA, CONCEPTO, CANTIDAD, POSOLOGIA, FORMA_COLOR, ' + ' LOTE, VISIBLE' + ' FROM' + ' MEDICACION_DETALLES' + ' WHERE (ID_MEDICACION = 2) AND' + ' (TIPO_DETALLE = '#39'En blister'#39')' + ' ORDER BY POSICION') + Left = 120 + Top = 312 + object detallesenblisterID: TIntegerField + FieldName = 'ID' + Origin = '"MEDICACION_DETALLES"."ID"' + Required = True + end + object detallesenblisterID_MEDICACION: TIntegerField + FieldName = 'ID_MEDICACION' + Origin = '"MEDICACION_DETALLES"."ID_MEDICACION"' + Required = True + end + object detallesenblisterPOSICION: TIntegerField + FieldName = 'POSICION' + Origin = '"MEDICACION_DETALLES"."POSICION"' + end + object detallesenblisterTIPO_DETALLE: TIBStringField + FieldName = 'TIPO_DETALLE' + Origin = '"MEDICACION_DETALLES"."TIPO_DETALLE"' + Size = 25 + end + object detallesenblisterID_ARTICULO: TIntegerField + FieldName = 'ID_ARTICULO' + Origin = '"MEDICACION_DETALLES"."ID_ARTICULO"' + end + object detallesenblisterREFERENCIA: TIBStringField + FieldName = 'REFERENCIA' + Origin = '"MEDICACION_DETALLES"."REFERENCIA"' + Size = 255 + end + object detallesenblisterCONCEPTO: TIBStringField + FieldName = 'CONCEPTO' + Origin = '"MEDICACION_DETALLES"."CONCEPTO"' + Size = 2000 + end + object detallesenblisterCANTIDAD: TIBBCDField + FieldName = 'CANTIDAD' + Origin = '"MEDICACION_DETALLES"."CANTIDAD"' + Precision = 18 + Size = 2 + end + object detallesenblisterPOSOLOGIA: TIBStringField + FieldName = 'POSOLOGIA' + Origin = '"MEDICACION_DETALLES"."POSOLOGIA"' + Size = 255 + end + object detallesenblisterFORMA_COLOR: TIBStringField + FieldName = 'FORMA_COLOR' + Origin = '"MEDICACION_DETALLES"."FORMA_COLOR"' + Size = 255 + end + object detallesenblisterLOTE: TIBStringField + FieldName = 'LOTE' + Origin = '"MEDICACION_DETALLES"."LOTE"' + Size = 255 + end + object detallesenblisterVISIBLE: TSmallintField + FieldName = 'VISIBLE' + Origin = '"MEDICACION_DETALLES"."VISIBLE"' + end + end + object DADSCabecera: TDADataSource + DataSet = tbl_Cabecera.Dataset + DataTable = tbl_Cabecera + Left = 264 + Top = 72 + end + object DADSDetallesEnBlister: TDADataSource + DataSet = tbl_DetallesFueraBlister.Dataset + DataTable = tbl_DetallesFueraBlister + Left = 360 + Top = 72 + end + object tbl_DetallesEnBlister: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID' + DataType = datInteger + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_ID' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID' + InPrimaryKey = True + end + item + Name = 'ID_MEDICACION' + DataType = datInteger + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_ID_MEDICACION' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID_MEDICACION' + end + item + Name = 'POSICION' + DataType = datInteger + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_POSICION' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_POSICION' + end + item + Name = 'TIPO_DETALLE' + DataType = datString + Size = 25 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_TIPO_DETALLE' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_TIPO_DETALLE' + end + item + Name = 'ID_ARTICULO' + DataType = datInteger + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_ID_ARTICULO' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID_ARTICULO' + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_REFERENCIA' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_REFERENCIA' + end + item + Name = 'CONCEPTO' + DataType = datString + Size = 2000 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_CONCEPTO' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_CONCEPTO' + end + item + Name = 'CANTIDAD' + DataType = datCurrency + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_CANTIDAD' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_CANTIDAD' + end + item + Name = 'POSOLOGIA' + DataType = datString + Size = 255 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_POSOLOGIA' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_POSOLOGIA' + end + item + Name = 'FORMA_COLOR' + DataType = datString + Size = 255 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_FORMA_COLOR' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_FORMA_COLOR' + end + item + Name = 'LOTE' + DataType = datString + Size = 255 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_LOTE' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_LOTE' + end + item + Name = 'VISIBLE' + DataType = datSmallInt + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_VISIBLE' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_VISIBLE' + end> + Params = < + item + Name = 'ID_MEDICACION' + Value = '2' + end> + MasterParamsMappings.Strings = ( + 'ID_FACTURA=ID') + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + LocalSchema = schReport + LocalDataStreamer = Bin2DataStreamer + LogicalName = 'InformeMedicaciones_DetallesEnBlister' + IndexDefs = <> + Left = 360 + Top = 128 + end + object tbl_Cabecera: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_ID' + InPrimaryKey = True + end + item + Name = 'ID_PACIENTE' + DataType = datInteger + DictionaryEntry = 'InformeMedicaciones_ID_PACIENTE' + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + DisplayLabel = 'Referencia' + DictionaryEntry = 'InformeMedicaciones_REFERENCIA' + end + item + Name = 'PACIENTE' + DataType = datString + Size = 255 + DisplayLabel = 'Paciente' + DictionaryEntry = 'InformeMedicaciones_PACIENTE' + end + item + Name = 'NUMERO_SS' + DataType = datString + Size = 255 + DisplayLabel = 'NASS' + DictionaryEntry = 'InformeMedicaciones_NUMERO_SS' + end + item + Name = 'FECHA_DESDE' + DataType = datDateTime + DisplayLabel = 'Desde' + DictionaryEntry = 'InformeMedicaciones_FECHA_DESDE' + end + item + Name = 'FECHA_HASTA' + DataType = datDateTime + DisplayLabel = 'Hasta' + DictionaryEntry = 'InformeMedicaciones_FECHA_HASTA' + end + item + Name = 'FARMACEUTICO' + DataType = datString + Size = 255 + DisplayLabel = 'Farmac'#233'utico' + DictionaryEntry = 'InformeMedicaciones_FARMACEUTICO' + end + item + Name = 'TELEFONO_FARM' + DataType = datString + Size = 25 + DisplayLabel = 'Tel'#233'fono farmac'#233'utico' + DictionaryEntry = 'InformeMedicaciones_TELEFONO_FARM' + end + item + Name = 'MOVIL_FARM' + DataType = datString + Size = 25 + DisplayLabel = 'M'#243'vil farmac'#233'utico' + DictionaryEntry = 'InformeMedicaciones_MOVIL_FARM' + end> + Params = < + item + Name = 'ID' + DataType = datInteger + Value = '2' + ParamType = daptInput + end> + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + LocalSchema = schReport + LocalDataStreamer = Bin2DataStreamer + LogicalName = 'InformeMedicaciones' + IndexDefs = <> + Left = 264 + Top = 128 + end + object frxCheckBoxObject1: TfrxCheckBoxObject + Left = 288 + Top = 256 + end + object frxChartObject1: TfrxChartObject + Left = 288 + Top = 304 + end + object frxGradientObject1: TfrxGradientObject + Left = 352 + Top = 256 + end + object frxCrossObject1: TfrxCrossObject + Left = 352 + Top = 408 + end + object frxOLEObject1: TfrxOLEObject + Left = 288 + Top = 408 + end + object frxBarCodeObject1: TfrxBarCodeObject + Left = 352 + Top = 360 + end + object frxRichObject1: TfrxRichObject + Left = 288 + Top = 360 + end + object frxReport: TfrxReport + Version = '4.7.71' + DotMatrixReport = False + IniFile = '\Software\Fast Reports' + PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick] + PreviewOptions.Zoom = 1.000000000000000000 + PrintOptions.Printer = 'Por defecto' + PrintOptions.PrintOnSheet = 0 + ReportOptions.CreateDate = 40861.487419398100000000 + ReportOptions.LastChange = 40878.727654502300000000 + ScriptLanguage = 'PascalScript' + ScriptText.Strings = ( + '' + 'begin' + '' + 'end.') + ShowProgress = False + StoreInDFM = False + Left = 121 + Top = 16 + end + object frxDBDetallesFueraBlister: TfrxDBDataset + UserName = 'frxDBDetallesFueraBlister' + CloseDataSource = False + DataSource = DataSource3 + BCDToCurrency = False + Left = 480 + Top = 16 + end + object DADSDetallesFueraBlister: TDADataSource + DataSet = tbl_DetallesFueraBlister.Dataset + DataTable = tbl_DetallesFueraBlister + Left = 480 + Top = 72 + end + object tbl_DetallesFueraBlister: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID' + DataType = datInteger + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_ID' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID' + InPrimaryKey = True + end + item + Name = 'ID_MEDICACION' + DataType = datInteger + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_ID_MEDICACION' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID_MEDICACION' + end + item + Name = 'POSICION' + DataType = datInteger + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_POSICION' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_POSICION' + end + item + Name = 'TIPO_DETALLE' + DataType = datString + Size = 25 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_TIPO_DETALLE' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_TIPO_DETALLE' + end + item + Name = 'ID_ARTICULO' + DataType = datInteger + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_ID_ARTICULO' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_ID_ARTICULO' + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_REFERENCIA' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_REFERENCIA' + end + item + Name = 'CONCEPTO' + DataType = datString + Size = 2000 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_CONCEPTO' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_CONCEPTO' + end + item + Name = 'CANTIDAD' + DataType = datCurrency + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_CANTIDAD' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_CANTIDAD' + end + item + Name = 'POSOLOGIA' + DataType = datString + Size = 255 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_POSOLOGIA' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_POSOLOGIA' + end + item + Name = 'FORMA_COLOR' + DataType = datString + Size = 255 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_FORMA_COLOR' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_FORMA_COLOR' + end + item + Name = 'LOTE' + DataType = datString + Size = 255 + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_LOTE' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_LOTE' + end + item + Name = 'VISIBLE' + DataType = datSmallInt + DisplayLabel = 'InformeMedicaciones_DetallesEnBlister_VISIBLE' + DictionaryEntry = 'InformeMedicaciones_DetallesEnBlister_VISIBLE' + end> + Params = < + item + Name = 'ID_MEDICACION' + Value = '2' + end> + MasterParamsMappings.Strings = ( + 'ID_FACTURA=ID') + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + LocalSchema = schReport + LocalDataStreamer = Bin2DataStreamer + LogicalName = 'InformeMedicaciones_DetallesFueraDeBlister' + IndexDefs = <> + Left = 480 + Top = 128 + end + object detallesfuerablister: TIBQuery + Database = IBDatabase1 + Transaction = IBTransaction1 + Active = True + SQL.Strings = ( + 'SELECT ' + ' ID, ID_MEDICACION, POSICION, TIPO_DETALLE, ID_ARTICULO, ' + ' REFERENCIA, CONCEPTO, CANTIDAD, POSOLOGIA, FORMA_COLOR, ' + ' LOTE, VISIBLE' + ' FROM' + ' MEDICACION_DETALLES' + ' WHERE (ID_MEDICACION = 2) AND' + ' (TIPO_DETALLE = '#39'Fuera del blister'#39')' + ' ORDER BY POSICION ') + Left = 120 + Top = 368 + object detallesfuerablisterID: TIntegerField + FieldName = 'ID' + Origin = '"MEDICACION_DETALLES"."ID"' + Required = True + end + object detallesfuerablisterID_MEDICACION: TIntegerField + FieldName = 'ID_MEDICACION' + Origin = '"MEDICACION_DETALLES"."ID_MEDICACION"' + Required = True + end + object detallesfuerablisterPOSICION: TIntegerField + FieldName = 'POSICION' + Origin = '"MEDICACION_DETALLES"."POSICION"' + end + object detallesfuerablisterTIPO_DETALLE: TIBStringField + FieldName = 'TIPO_DETALLE' + Origin = '"MEDICACION_DETALLES"."TIPO_DETALLE"' + Size = 25 + end + object detallesfuerablisterID_ARTICULO: TIntegerField + FieldName = 'ID_ARTICULO' + Origin = '"MEDICACION_DETALLES"."ID_ARTICULO"' + end + object detallesfuerablisterREFERENCIA: TIBStringField + FieldName = 'REFERENCIA' + Origin = '"MEDICACION_DETALLES"."REFERENCIA"' + Size = 255 + end + object detallesfuerablisterCONCEPTO: TIBStringField + FieldName = 'CONCEPTO' + Origin = '"MEDICACION_DETALLES"."CONCEPTO"' + Size = 2000 + end + object detallesfuerablisterCANTIDAD: TIBBCDField + FieldName = 'CANTIDAD' + Origin = '"MEDICACION_DETALLES"."CANTIDAD"' + Precision = 18 + Size = 2 + end + object detallesfuerablisterPOSOLOGIA: TIBStringField + FieldName = 'POSOLOGIA' + Origin = '"MEDICACION_DETALLES"."POSOLOGIA"' + Size = 255 + end + object detallesfuerablisterFORMA_COLOR: TIBStringField + FieldName = 'FORMA_COLOR' + Origin = '"MEDICACION_DETALLES"."FORMA_COLOR"' + Size = 255 + end + object detallesfuerablisterLOTE: TIBStringField + FieldName = 'LOTE' + Origin = '"MEDICACION_DETALLES"."LOTE"' + Size = 255 + end + object detallesfuerablisterVISIBLE: TSmallintField + FieldName = 'VISIBLE' + Origin = '"MEDICACION_DETALLES"."VISIBLE"' + end + end + object DataSource3: TDataSource + DataSet = detallesfuerablister + Left = 200 + Top = 368 + end + object frxPDFExport1: TfrxPDFExport + ShowDialog = False + UseFileCache = True + ShowProgress = False + OverwritePrompt = False + PrintOptimized = True + Outline = False + Background = False + HTMLTags = True + Author = 'FactuGES' + Subject = 'FactuGES' + Creator = 'FactuGES' + ProtectionFlags = [ePrint, eModify, eCopy, eAnnot] + HideToolbar = False + HideMenubar = False + HideWindowUI = False + FitWindow = False + CenterWindow = False + PrintScaling = False + Left = 416 + Top = 256 + end + object Bin2DataStreamer: TDABin2DataStreamer + Left = 40 + Top = 88 + end +end diff --git a/Source/Modulos/Medicaciones/Reports/uRptMedicaciones_Server.pas b/Source/Modulos/Medicaciones/Reports/uRptMedicaciones_Server.pas new file mode 100644 index 0000000..4e9a65a --- /dev/null +++ b/Source/Modulos/Medicaciones/Reports/uRptMedicaciones_Server.pas @@ -0,0 +1,171 @@ +unit uRptMedicaciones_Server; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, frxClass, frxDBSet, uDAScriptingProvider, + uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient, + frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes, + uDAInterfaces, uDADataStreamer, IBCustomDataSet, IBQuery, IBDatabase, + uDAMemDataTable, frxExportPDF, uDABin2DataStreamer, Etiquetas_Intf; + +type + TRptMedicaciones = class(TDataModule) + frxDBCabecera: TfrxDBDataset; + frxDBDetallesEnBlister: TfrxDBDataset; + IBDatabase1: TIBDatabase; + IBTransaction1: TIBTransaction; + DataSource1: TDataSource; + DataSource2: TDataSource; + cabecera: TIBQuery; + detallesenblister: TIBQuery; + DADSCabecera: TDADataSource; + DADSDetallesEnBlister: TDADataSource; + tbl_DetallesEnBlister: TDAMemDataTable; + tbl_Cabecera: TDAMemDataTable; + frxCheckBoxObject1: TfrxCheckBoxObject; + frxChartObject1: TfrxChartObject; + frxGradientObject1: TfrxGradientObject; + frxCrossObject1: TfrxCrossObject; + frxOLEObject1: TfrxOLEObject; + frxBarCodeObject1: TfrxBarCodeObject; + frxRichObject1: TfrxRichObject; + frxReport: TfrxReport; + frxDBDetallesFueraBlister: TfrxDBDataset; + DADSDetallesFueraBlister: TDADataSource; + tbl_DetallesFueraBlister: TDAMemDataTable; + detallesfuerablister: TIBQuery; + DataSource3: TDataSource; + frxPDFExport1: TfrxPDFExport; + Bin2DataStreamer: TDABin2DataStreamer; + schReport: TDASchema; + DataDictionary: TDADataDictionary; + detallesenblisterID: TIntegerField; + detallesenblisterID_MEDICACION: TIntegerField; + detallesenblisterPOSICION: TIntegerField; + detallesenblisterTIPO_DETALLE: TIBStringField; + detallesenblisterID_ARTICULO: TIntegerField; + detallesenblisterREFERENCIA: TIBStringField; + detallesenblisterCONCEPTO: TIBStringField; + detallesenblisterCANTIDAD: TIBBCDField; + detallesenblisterPOSOLOGIA: TIBStringField; + detallesenblisterFORMA_COLOR: TIBStringField; + detallesenblisterLOTE: TIBStringField; + detallesenblisterVISIBLE: TSmallintField; + cabeceraID: TIntegerField; + cabeceraID_PACIENTE: TIntegerField; + cabeceraREFERENCIA: TIBStringField; + cabeceraPACIENTE: TIBStringField; + cabeceraNUMERO_SS: TIBStringField; + cabeceraFECHA_DESDE: TDateField; + cabeceraFECHA_HASTA: TDateField; + cabeceraFARMACEUTICO: TIBStringField; + cabeceraTELEFONO_FARM: TIBStringField; + cabeceraMOVIL_FARM: TIBStringField; + detallesfuerablisterID: TIntegerField; + detallesfuerablisterID_MEDICACION: TIntegerField; + detallesfuerablisterPOSICION: TIntegerField; + detallesfuerablisterTIPO_DETALLE: TIBStringField; + detallesfuerablisterID_ARTICULO: TIntegerField; + detallesfuerablisterREFERENCIA: TIBStringField; + detallesfuerablisterCONCEPTO: TIBStringField; + detallesfuerablisterCANTIDAD: TIBBCDField; + detallesfuerablisterPOSOLOGIA: TIBStringField; + detallesfuerablisterFORMA_COLOR: TIBStringField; + detallesfuerablisterLOTE: TIBStringField; + detallesfuerablisterVISIBLE: TSmallintField; + procedure DataModuleCreate(Sender: TObject); + procedure DataModuleDestroy(Sender: TObject); + private + FConnection: IDAConnection; + procedure _GenerarInforme(const ID: Integer); + public + function GenerarInforme(const ListaID : TIntegerArray): Binary; + end; + +implementation + +{$R *.dfm} + +uses + uSistemaFunc, StrUtils, uDataModuleServer, + uROServer, DataAbstract4_Intf; + +const + rptEtiquetas = 'EtiquetasBlister.fr3'; + +{ TRptMedicaciones } + + +procedure TRptMedicaciones.DataModuleCreate(Sender: TObject); +begin + schReport.ConnectionManager := dmServer.ConnectionManager; + FConnection := dmServer.DarNuevaConexion; + frxReport.EngineOptions.NewSilentMode := simSilent; + + frxDBCabecera.DataSource := DADSCabecera; + frxDBCabecera.CloseDataSource := False; + + frxDBDetallesEnBlister.DataSource := DADSDetallesEnBlister; + frxDBDetallesEnBlister.CloseDataSource := False; + + frxDBDetallesFueraBlister.DataSource := DADSDetallesFueraBlister; + frxDBDetallesFueraBlister.CloseDataSource := False; +end; + +procedure TRptMedicaciones.DataModuleDestroy(Sender: TObject); +begin + tbl_Cabecera.Active := False; + tbl_DetallesEnBlister.Active := False; + tbl_DetallesFueraBlister.Active := False; +end; + +function TRptMedicaciones.GenerarInforme(const ListaID: TIntegerArray): Binary; +var + i: Integer; +begin + Result := Binary.Create; + try + //Vamos generando todos y cada una de las facturas recibidas + for i := 0 to ListaID.Count - 1 do + _GenerarInforme(ListaID.Items[i]); + + frxReport.PreviewPages.SaveToStream(Result); + finally + end; +end; + +procedure TRptMedicaciones._GenerarInforme(const ID: Integer); +var + AInforme: Variant; +begin + FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + try + tbl_Cabecera.Active := False; + tbl_DetallesEnBlister.Active := False; + tbl_DetallesFueraBlister.Active := False; + + tbl_Cabecera.ParamByName('ID').AsInteger := ID; + tbl_DetallesEnBlister.ParamByName('ID_MEDICACION').AsInteger := ID; + tbl_DetallesFueraBlister.ParamByName('ID_MEDICACION').AsInteger := ID; + + tbl_Cabecera.Active := True; + tbl_DetallesEnBlister.Active := True; + tbl_DetallesFueraBlister.Active := True; + + AInforme := DarRutaFichero(DarRutaInformes, rptEtiquetas); + if VarIsNull(AInforme) then + raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe ' + rptEtiquetas)); + + frxReport.LoadFromFile(AInforme, True); + + frxReport.PrepareReport(False); + + finally + FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + end; +end; + + +end. diff --git a/Source/Modulos/Medicaciones/Servidor/srvMedicacion_Impl.pas b/Source/Modulos/Medicaciones/Servidor/srvMedicacion_Impl.pas index 1f7140f..87b4cca 100644 --- a/Source/Modulos/Medicaciones/Servidor/srvMedicacion_Impl.pas +++ b/Source/Modulos/Medicaciones/Servidor/srvMedicacion_Impl.pas @@ -34,8 +34,6 @@ type protected { IsrvMedicacion methods } function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEtiquetas(const ID: Integer): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; end; implementation @@ -44,7 +42,7 @@ implementation uses {Generated:} Etiquetas_Invk, uDataModuleServer, uDatabaseUtils, schMedicacionClient_Intf, uRestriccionesUsuarioUtils, - uSistemaFunc, uBizMedicacionServer; + uSistemaFunc, uBizMedicacionServer, uRptMedicaciones_Server; procedure Create_srvMedicacion(out anInstance : IUnknown); @@ -65,18 +63,15 @@ begin end; function TsrvMedicacion.GenerarInforme(const ListaID: TIntegerArray): Binary; +var + AReportGenerator : TRptMedicaciones; begin - // -end; - -function TsrvMedicacion.GenerarInformeEtiquetas(const ID: Integer): Binary; -begin - // -end; - -function TsrvMedicacion.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; -begin - // + AReportGenerator := TRptMedicaciones.Create(nil); + try + Result := AReportGenerator.GenerarInforme(ListaID); + finally + FreeAndNIL(AReportGenerator); + end; end; var diff --git a/Source/Modulos/Medicaciones/Views/Medicaciones_view.dpk b/Source/Modulos/Medicaciones/Views/Medicaciones_view.dpk index 6f8589f..168ec8d 100644 --- a/Source/Modulos/Medicaciones/Views/Medicaciones_view.dpk +++ b/Source/Modulos/Medicaciones/Views/Medicaciones_view.dpk @@ -75,7 +75,12 @@ requires dxPScxGrid6LnkD11, dclcxLibraryD11, JSDialog100, - JvCtrlsD11R; + JvCtrlsD11R, + frx11, + fs11, + fqb110, + bdertl, + frxe11; contains uMedicacionesViewRegister in 'uMedicacionesViewRegister.pas', @@ -86,6 +91,7 @@ contains uEditorMedicaciones in 'uEditorMedicaciones.pas' {fEditorMedicaciones: TEditor}, uViewElegirArticulosMedicaciones in 'uViewElegirArticulosMedicaciones.pas' {frViewElegirArticulosMedicaciones: TFrame}, uEditorElegirArticulosMedicaciones in 'uEditorElegirArticulosMedicaciones.pas' {fEditorElegirArticulosMedicaciones: TEditor}, - uViewDatosYSeleccionPacienteMedicacion in 'uViewDatosYSeleccionPacienteMedicacion.pas' {frViewDatosYSeleccionPacienteMedicacion: TFrame}; + uViewDatosYSeleccionPacienteMedicacion in 'uViewDatosYSeleccionPacienteMedicacion.pas' {frViewDatosYSeleccionPacienteMedicacion: TFrame}, + uEditorMedicacionesReport in 'uEditorMedicacionesReport.pas' {fEditorMedicacionesPreview}; end. diff --git a/Source/Modulos/Medicaciones/Views/Medicaciones_view.dproj b/Source/Modulos/Medicaciones/Views/Medicaciones_view.dproj index b882959..09dc642 100644 --- a/Source/Modulos/Medicaciones/Views/Medicaciones_view.dproj +++ b/Source/Modulos/Medicaciones/Views/Medicaciones_view.dproj @@ -51,14 +51,6 @@ - - - - - - - - File c:\archivos de programa\borland\delphi10\Bin\dclIntraweb_80_100.bpl not found File c:\archivos de programa\borland\delphi10\Bin\dclnet100.bpl not found File c:\archivos de programa\borland\delphi10\Bin\dclsoap100.bpl not found @@ -74,6 +66,7 @@ + @@ -96,6 +89,10 @@ + + + + @@ -126,9 +123,12 @@
fEditorMedicaciones
TEditor
+ +
fEditorMedicacionesPreview
+
-
TfrViewDatosYSeleccionPacienteMedicacion
+
frViewDatosYSeleccionPacienteMedicacion
TFrame
diff --git a/Source/Modulos/Medicaciones/Views/uEditorAlbaranesClienteReport.dfm b/Source/Modulos/Medicaciones/Views/uEditorMedicacionesReport.dfm similarity index 70% rename from Source/Modulos/Medicaciones/Views/uEditorAlbaranesClienteReport.dfm rename to Source/Modulos/Medicaciones/Views/uEditorMedicacionesReport.dfm index 3926992..699e76d 100644 --- a/Source/Modulos/Medicaciones/Views/uEditorAlbaranesClienteReport.dfm +++ b/Source/Modulos/Medicaciones/Views/uEditorMedicacionesReport.dfm @@ -1,7 +1,5 @@ -inherited fEditorAlbaranesClientePreview: TfEditorAlbaranesClientePreview +inherited fEditorMedicacionesPreview: TfEditorMedicacionesPreview Caption = 'Previsualizar el albar'#225'n de cliente' - ExplicitWidth = 320 - ExplicitHeight = 240 PixelsPerInch = 96 TextHeight = 13 inherited TBXDock: TTBXDock diff --git a/Source/Modulos/Medicaciones/Views/uEditorAlbaranesClienteReport.pas b/Source/Modulos/Medicaciones/Views/uEditorMedicacionesReport.pas similarity index 52% rename from Source/Modulos/Medicaciones/Views/uEditorAlbaranesClienteReport.pas rename to Source/Modulos/Medicaciones/Views/uEditorMedicacionesReport.pas index 97b1850..c6de0eb 100644 --- a/Source/Modulos/Medicaciones/Views/uEditorAlbaranesClienteReport.pas +++ b/Source/Modulos/Medicaciones/Views/uEditorMedicacionesReport.pas @@ -1,4 +1,4 @@ -unit uEditorAlbaranesClienteReport; +unit uEditorMedicacionesReport; interface @@ -9,15 +9,16 @@ uses // frxBarcode, JvAppStorage, JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, StdActns, ActnList, ComCtrls, TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, - ExtCtrls, JvExControls, JvComponent, JvNavigationPane, uIEditorAlbaranesClientePreview, + ExtCtrls, JvExControls, JvComponent, JvNavigationPane, uIEditorMedicacionesPreview, JvExComCtrls, JvStatusBar, frxDMPExport, frxGradient, frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, JvAppRegistryStorage, JvComponentBase, frxExportText, frxExportRTF, frxExportMail, frxExportXLS; type - TfEditorAlbaranesClientePreview = class(TfEditorPreview, IEditorAlbaranesClientePreview) + TfEditorMedicacionesPreview = class(TfEditorPreview, IEditorMedicacionesPreview) TBXItem58: TTBXItem; - procedure actExportarRTFExecute(Sender: TObject); + public + procedure Preview; override; end; @@ -25,21 +26,13 @@ implementation {$R *.dfm} -uses - uAlbaranesClienteReportController, uDialogUtils; -procedure TfEditorAlbaranesClientePreview.actExportarRTFExecute( - Sender: TObject); -var - I: Integer; +{ TfEditorMedicacionesPreview } + +procedure TfEditorMedicacionesPreview.Preview; begin - // inherited; <- No llamar al padre - if not Assigned(Controller) then - raise Exception.Create('No se ha asignado el controlador necesario'); - - for I := 0 to ListaID.Count - 1 do - if (Controller as IAlbaranesClienteReportController).ExportToWord(ListaID[I]) then - ShowInfoMessage('El albarán se ha exportado correctamente.'); + inherited; + frxReport1.ShowPreparedReport; end; end. diff --git a/Source/Modulos/Medicaciones/Views/uMedicacionesViewRegister.pas b/Source/Modulos/Medicaciones/Views/uMedicacionesViewRegister.pas index f854a7a..669f229 100644 --- a/Source/Modulos/Medicaciones/Views/uMedicacionesViewRegister.pas +++ b/Source/Modulos/Medicaciones/Views/uMedicacionesViewRegister.pas @@ -9,13 +9,14 @@ implementation uses uEditorRegistryUtils, uEditorMedicaciones, uEditorMedicacion, - uEditorElegirArticulosMedicaciones; + uEditorElegirArticulosMedicaciones, uEditorMedicacionesReport; procedure RegisterViews; begin EditorRegistry.RegisterClass(TfEditorMedicaciones, 'EditorMedicaciones'); EditorRegistry.RegisterClass(TfEditorMedicacion, 'EditorMedicacion'); EditorRegistry.RegisterClass(TfEditorElegirArticulosMedicaciones, 'EditorElegirArticulosMedicaciones'); + EditorRegistry.RegisterClass(TfEditorMedicacionesPreview, 'EditorMedicacionesPreview'); end; procedure UnregisterViews; @@ -23,6 +24,7 @@ begin EditorRegistry.UnRegisterClass(TfEditorMedicaciones); EditorRegistry.UnRegisterClass(TfEditorMedicacion); EditorRegistry.UnRegisterClass(TfEditorElegirArticulosMedicaciones); + EditorRegistry.UnRegisterClass(TfEditorMedicacionesPreview); end; end. diff --git a/Source/Modulos/Medicaciones/Views/uViewDetallesMedicacion.dfm b/Source/Modulos/Medicaciones/Views/uViewDetallesMedicacion.dfm index 95864a7..bd0f805 100644 --- a/Source/Modulos/Medicaciones/Views/uViewDetallesMedicacion.dfm +++ b/Source/Modulos/Medicaciones/Views/uViewDetallesMedicacion.dfm @@ -1,83 +1,96 @@ inherited frViewDetallesMedicacion: TfrViewDetallesMedicacion inherited ToolBar1: TToolBar - Height = 95 - ExplicitHeight = 95 - inherited ToolButton14: TToolButton [2] - Left = 129 + Height = 100 + ExplicitHeight = 100 + inherited ToolButton3: TToolButton Wrap = False - ExplicitLeft = 56 - ExplicitTop = 22 end - inherited ToolButton3: TToolButton [3] - Left = 194 - ExplicitLeft = 194 - end - inherited ToolButton4: TToolButton [4] - Left = 249 - ExplicitLeft = 249 - end - inherited ToolButton8: TToolButton [5] - Left = 305 + inherited ToolButton4: TToolButton + Left = 184 Top = 0 - Wrap = True - ExplicitLeft = 305 + ExplicitLeft = 184 ExplicitTop = 0 end - inherited FontName: TJvFontComboBox [6] + inherited ToolButton14: TToolButton + Left = 240 + Top = 0 + ExplicitLeft = 240 + ExplicitTop = 0 end - inherited ToolButton13: TToolButton [7] - Left = 145 - ExplicitLeft = 145 - end - inherited ToolButton6: TToolButton [8] - Left = 153 - ExplicitLeft = 153 - end - inherited ToolButton9: TToolButton [9] - Left = 219 + inherited FontName: TJvFontComboBox Top = 22 - ExplicitLeft = 219 ExplicitTop = 22 end - inherited ToolButton12: TToolButton [10] + inherited FontSize: TEdit + Top = 22 + Width = 170 + ExplicitTop = 22 + ExplicitWidth = 170 end - inherited FontSize: TEdit [11] + inherited ToolButton13: TToolButton [7] + Left = 0 + Top = 22 + Wrap = True + ExplicitLeft = 0 + ExplicitTop = 22 + ExplicitHeight = 30 + end + inherited UpDown1: TUpDown [8] Left = 0 Top = 52 - Width = 154 ExplicitLeft = 0 ExplicitTop = 52 - ExplicitWidth = 154 end - inherited UpDown1: TUpDown [12] - Left = 154 + inherited ToolButton6: TToolButton + Left = 17 Top = 52 - ExplicitLeft = 154 + ExplicitLeft = 17 ExplicitTop = 52 end - inherited ToolButton7: TToolButton [13] - Left = 171 + inherited ToolButton7: TToolButton + Left = 83 Top = 52 - ExplicitLeft = 171 + ExplicitLeft = 83 ExplicitTop = 52 end + inherited ToolButton8: TToolButton + Left = 150 + Top = 52 + ExplicitLeft = 150 + ExplicitTop = 52 + end + inherited ToolButton12: TToolButton + Left = 0 + Top = 52 + Wrap = True + ExplicitLeft = 0 + ExplicitTop = 52 + ExplicitHeight = 30 + end + inherited ToolButton9: TToolButton + Left = 0 + Top = 82 + ExplicitLeft = 0 + ExplicitTop = 82 + end inherited ToolButton10: TToolButton - Left = 238 - Wrap = True - ExplicitLeft = 238 + Left = 145 + Top = 82 + ExplicitLeft = 145 + ExplicitTop = 82 end inherited ToolButton11: TToolButton - Left = 0 - Top = 74 - ExplicitLeft = 0 - ExplicitTop = 74 + Left = 270 + Top = 82 + ExplicitLeft = 270 + ExplicitTop = 82 end end inherited cxGrid: TcxGrid - Top = 121 - Height = 183 - ExplicitTop = 121 - ExplicitHeight = 183 + Top = 126 + Height = 178 + ExplicitTop = 126 + ExplicitHeight = 178 inherited cxGridView: TcxGridDBTableView inherited cxGridViewTIPO: TcxGridDBColumn BestFitMaxWidth = 80 @@ -90,6 +103,7 @@ inherited frViewDetallesMedicacion: TfrViewDetallesMedicacion Width = 43 end inherited cxGridViewDESCRIPCION: TcxGridDBColumn + Properties.PlainText = True Width = 164 end inherited cxGridViewCANTIDAD: TcxGridDBColumn @@ -126,8 +140,8 @@ inherited frViewDetallesMedicacion: TfrViewDetallesMedicacion end end inherited TBXDock1: TTBXDock - Top = 95 - ExplicitTop = 95 + Top = 100 + ExplicitTop = 100 inherited TBXToolbar1: TTBXToolbar DockPos = 0 inherited TBXSubmenuItem1: TTBXSubmenuItem diff --git a/Source/Servicios/Etiquetas.RODL b/Source/Servicios/Etiquetas.RODL index 4f330d7..d4dc74c 100644 --- a/Source/Servicios/Etiquetas.RODL +++ b/Source/Servicios/Etiquetas.RODL @@ -117,22 +117,6 @@ - - - - - - - - - - - - - - - - diff --git a/Source/Servicios/Etiquetas_Intf.pas b/Source/Servicios/Etiquetas_Intf.pas index ec14649..dfa1058 100644 --- a/Source/Servicios/Etiquetas_Intf.pas +++ b/Source/Servicios/Etiquetas_Intf.pas @@ -279,8 +279,6 @@ type IsrvMedicacion = interface(IDataAbstractService) ['{6E910718-9AB0-47BB-9875-B0DE66A68D7A}'] function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEtiquetas(const ID: Integer): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; end; { CosrvMedicacion } @@ -294,8 +292,6 @@ type function __GetInterfaceName:string; override; function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEtiquetas(const ID: Integer): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; end; { IsrvReferencias } @@ -970,40 +966,6 @@ begin end end; -function TsrvMedicacion_Proxy.GenerarInformeEtiquetas(const ID: Integer): Binary; -begin - try - result := nil; - __Message.InitializeRequestMessage(__TransportChannel, 'Etiquetas', __InterfaceName, 'GenerarInformeEtiquetas'); - __Message.Write('ID', TypeInfo(Integer), ID, []); - __Message.Finalize; - - __TransportChannel.Dispatch(__Message); - - __Message.Read('Result', TypeInfo(Binary), result, []); - finally - __Message.UnsetAttributes(__TransportChannel); - __Message.FreeStream; - end -end; - -function TsrvMedicacion_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; -begin - try - result := nil; - __Message.InitializeRequestMessage(__TransportChannel, 'Etiquetas', __InterfaceName, 'GenerarInformeEnPDF'); - __Message.Write('ListaID', TypeInfo(Etiquetas_Intf.TIntegerArray), ListaID, []); - __Message.Finalize; - - __TransportChannel.Dispatch(__Message); - - __Message.Read('Result', TypeInfo(Binary), result, []); - finally - __Message.UnsetAttributes(__TransportChannel); - __Message.FreeStream; - end -end; - { CosrvReferencias } class function CosrvReferencias.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvReferencias; diff --git a/Source/Servicios/Etiquetas_Invk.pas b/Source/Servicios/Etiquetas_Invk.pas index 8504ca8..f120961 100644 --- a/Source/Servicios/Etiquetas_Invk.pas +++ b/Source/Servicios/Etiquetas_Invk.pas @@ -81,8 +81,6 @@ type constructor Create; override; published procedure Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); - procedure Invoke_GenerarInformeEtiquetas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); - procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); end; TsrvReferencias_Invoker = class(TDataAbstractService_Invoker) @@ -350,64 +348,6 @@ begin end; end; -procedure TsrvMedicacion_Invoker.Invoke_GenerarInformeEtiquetas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEtiquetas(const ID: Integer): Binary; } -var - ID: Integer; - lResult: Binary; - __lObjectDisposer: TROObjectDisposer; -begin - lResult := nil; - try - __Message.Read('ID', TypeInfo(Integer), ID, []); - - lResult := (__Instance as IsrvMedicacion).GenerarInformeEtiquetas(ID); - - __Message.InitializeResponseMessage(__Transport, 'Etiquetas', 'srvMedicacion', 'GenerarInformeEtiquetasResponse'); - __Message.Write('Result', TypeInfo(Binary), lResult, []); - __Message.Finalize; - __Message.UnsetAttributes(__Transport); - - finally - __lObjectDisposer := TROObjectDisposer.Create(__Instance); - try - __lObjectDisposer.Add(lResult); - finally - __lObjectDisposer.Free(); - end; - end; -end; - -procedure TsrvMedicacion_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; } -var - ListaID: Etiquetas_Intf.TIntegerArray; - lResult: Binary; - __lObjectDisposer: TROObjectDisposer; -begin - ListaID := nil; - lResult := nil; - try - __Message.Read('ListaID', TypeInfo(Etiquetas_Intf.TIntegerArray), ListaID, []); - - lResult := (__Instance as IsrvMedicacion).GenerarInformeEnPDF(ListaID); - - __Message.InitializeResponseMessage(__Transport, 'Etiquetas', 'srvMedicacion', 'GenerarInformeEnPDFResponse'); - __Message.Write('Result', TypeInfo(Binary), lResult, []); - __Message.Finalize; - __Message.UnsetAttributes(__Transport); - - finally - __lObjectDisposer := TROObjectDisposer.Create(__Instance); - try - __lObjectDisposer.Add(ListaID); - __lObjectDisposer.Add(lResult); - finally - __lObjectDisposer.Free(); - end; - end; -end; - { TsrvReferencias_Invoker } constructor TsrvReferencias_Invoker.Create; diff --git a/Source/Servicios/RODLFILE.res b/Source/Servicios/RODLFILE.res index d27cf85..fc235cb 100644 Binary files a/Source/Servicios/RODLFILE.res and b/Source/Servicios/RODLFILE.res differ diff --git a/Source/Servidor/Etiquetas_Server.dpr b/Source/Servidor/Etiquetas_Server.dpr index 3eb4f8b..c4e2d47 100644 --- a/Source/Servidor/Etiquetas_Server.dpr +++ b/Source/Servidor/Etiquetas_Server.dpr @@ -57,7 +57,8 @@ uses Etiquetas_Intf in '..\Servicios\Etiquetas_Intf.pas', schMedicacionClient_Intf in '..\Modulos\Medicaciones\Model\schMedicacionClient_Intf.pas', schMedicacionServer_Intf in '..\Modulos\Medicaciones\Model\schMedicacionServer_Intf.pas', - uBizMedicacionServer in '..\Modulos\Medicaciones\Model\uBizMedicacionServer.pas'; + uBizMedicacionServer in '..\Modulos\Medicaciones\Model\uBizMedicacionServer.pas', + uRptMedicaciones_Server in '..\Modulos\Medicaciones\Reports\uRptMedicaciones_Server.pas' {RptMedicaciones: TDataModule}; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/Etiquetas_Server.dproj b/Source/Servidor/Etiquetas_Server.dproj index 5e1d968..e460b4f 100644 --- a/Source/Servidor/Etiquetas_Server.dproj +++ b/Source/Servidor/Etiquetas_Server.dproj @@ -94,6 +94,10 @@ + +
RptMedicaciones
+ TDataModule +
srvMedicacion
TDataAbstractService diff --git a/Source/Servidor/Etiquetas_Server.rc b/Source/Servidor/Etiquetas_Server.rc index 250931b..cd80790 100644 --- a/Source/Servidor/Etiquetas_Server.rc +++ b/Source/Servidor/Etiquetas_Server.rc @@ -17,7 +17,7 @@ BEGIN VALUE "InternalName", "Etiquetas Server\0" VALUE "ProductName", "Etiquetas Server\0" VALUE "ProductVersion", "1.0.0.0\0" - VALUE "CompileDate", "miércoles, 30 de noviembre de 2011 14:08\0" + VALUE "CompileDate", "jueves, 01 de diciembre de 2011 18:03\0" END END BLOCK "VarFileInfo" diff --git a/Source/Servidor/Etiquetas_Server.res b/Source/Servidor/Etiquetas_Server.res index 28eb934..ae2fefd 100644 Binary files a/Source/Servidor/Etiquetas_Server.res and b/Source/Servidor/Etiquetas_Server.res differ