line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Sandy::Command::Quality; |
2
|
|
|
|
|
|
|
# ABSTRACT: quality command class. Manage quality profile database. |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
567
|
use App::Sandy::Base 'class'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
505
|
use App::Sandy::DB::Handle::Quality; |
|
1
|
|
|
|
|
431
|
|
|
1
|
|
|
|
|
43
|
|
6
|
1
|
|
|
1
|
|
10
|
use Text::ASCIITable; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
466
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
extends 'App::Sandy::CLI::Command'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.25'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has 'db' => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'App::Sandy::DB::Handle::Quality', |
15
|
|
|
|
|
|
|
builder => '_build_db', |
16
|
|
|
|
|
|
|
lazy_build => 1, |
17
|
|
|
|
|
|
|
handles => [qw/insertdb restoredb deletedb make_report retrievedb/] |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _build_db { |
21
|
0
|
|
|
0
|
|
|
return App::Sandy::DB::Handle::Quality->new; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
override 'opt_spec' => sub { |
25
|
|
|
|
|
|
|
super |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub subcommand_map { |
29
|
0
|
|
|
0
|
0
|
|
add => 'App::Sandy::Command::Quality::Add', |
30
|
|
|
|
|
|
|
remove => 'App::Sandy::Command::Quality::Remove', |
31
|
|
|
|
|
|
|
restore => 'App::Sandy::Command::Quality::Restore', |
32
|
|
|
|
|
|
|
dump => 'App::Sandy::Command::Quality::Dump' |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub validate_args { |
36
|
0
|
|
|
0
|
1
|
|
my ($self, $args) = @_; |
37
|
0
|
0
|
|
|
|
|
die "Too many arguments: '@$args'\n" if @$args; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub execute { |
41
|
0
|
|
|
0
|
1
|
|
my ($self, $opts, $args) = @_; |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
my $report_ref = $self->make_report; |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
if (%$report_ref) { |
46
|
0
|
|
|
|
|
|
my $t1 = Text::ASCIITable->new; |
47
|
0
|
|
|
|
|
|
$t1->setCols('quality profile', 'mean', 'stdd', 'error', 'type', 'source', 'provider', 'date'); |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
for my $quality_profile (sort keys %$report_ref) { |
50
|
0
|
|
|
|
|
|
my $attr = $report_ref->{$quality_profile}; |
51
|
|
|
|
|
|
|
$t1->addRow($quality_profile, $attr->{mean}, $attr->{stdd}, $attr->{error}, $attr->{type}, |
52
|
0
|
|
|
|
|
|
$attr->{source}, $attr->{provider}, $attr->{date}); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
print $t1; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=pod |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=encoding UTF-8 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
App::Sandy::Command::Quality - quality command class. Manage quality profile database. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 VERSION |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
version 0.25 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 SYNOPSIS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sandy quality |
76
|
|
|
|
|
|
|
sandy quality [options] |
77
|
|
|
|
|
|
|
sandy quality <command> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Options: |
80
|
|
|
|
|
|
|
-h, --help brief help message |
81
|
|
|
|
|
|
|
-H, --man full documentation |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Commands: |
84
|
|
|
|
|
|
|
add add a new quality profile to database |
85
|
|
|
|
|
|
|
dump dump a quality-profle from database |
86
|
|
|
|
|
|
|
remove remove an user quality profle from database |
87
|
|
|
|
|
|
|
restore restore the database |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 DESCRIPTION |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Manage quality-profile database. Running this command without any |
92
|
|
|
|
|
|
|
option or command will show all available profiles in the database. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 AUTHORS |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=over 4 |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Thiago L. A. Miller <tmiller@mochsl.org.br> |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item * |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
J. Leonel Buzzo <lbuzzo@mochsl.org.br> |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Felipe R. C. dos Santos <fsantos@mochsl.org.br> |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item * |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Helena B. Conceição <hconceicao@mochsl.org.br> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item * |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item * |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Gabriela Guardia <gguardia@mochsl.org.br> |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=item * |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Fernanda Orpinelli <forpinelli@mochsl.org.br> |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=item * |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Rafael Mercuri <rmercuri@mochsl.org.br> |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item * |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item * |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Pedro A. F. Galante <pgalante@mochsl.org.br> |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=back |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
This software is Copyright (c) 2023 by Teaching and Research Institute from Sírio-Libanês Hospital. |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
This is free software, licensed under: |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=cut |