knartform 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,152 @@
1
+ doctype html
2
+ html[lang="en"]
3
+ head
4
+ meta name="author" content="Preston Lee <preston@asu.edu>"
5
+ - if title = document.xpath('//knart:knowledgeDocument/knart:metadata/knart:title', knart: 'urn:hl7-org:knowledgeartifact:r1').first
6
+ title = title['value']
7
+ meta charset="utf-8"
8
+ meta http-equiv="X-UA-Compatible" content="IE=edge"
9
+ meta name="viewport" content="width=device-width, initial-scale=1"
10
+
11
+ / Bootstrap 3 + Font Awesome. Awesome!
12
+ link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
13
+ / link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
14
+ link rel="stylesheet" href="https://bootswatch.com/readable/bootstrap.min.css"
15
+ link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"
16
+ script src="http://code.jquery.com/jquery-3.1.1.min.js"
17
+ script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
18
+ script src="http://cdn.jsdelivr.net/jquery.validation/1.15.1/jquery.validate.min.js"
19
+
20
+
21
+ css:
22
+ body {
23
+ background: url('http://ui.healthcreek.org/app/images/textures/wild_oliva.png');
24
+ }
25
+ .action_group {
26
+ margin: 10px;
27
+ padding: 10px;
28
+ border: 1px solid #ddd;
29
+ box-shadow: 0 20px 20px rgba(0,0,0,.4);
30
+ border-radius: 4px;
31
+ }
32
+
33
+ .action_group .form-group {
34
+ margin-left: 0;
35
+ }
36
+ #applicability,
37
+ #contributors,
38
+ #actions {
39
+ padding: 10px;
40
+ }
41
+ .stuff {
42
+ background: url('http://ui.healthcreek.org/app/images/textures/crossword.png');
43
+ padding: 10px;
44
+ box-shadow: 0 20px 20px rgba(0,0,0,.4);
45
+ border-radius: 2px;
46
+ }
47
+
48
+ javascript:
49
+
50
+ $(function() {
51
+ console.log("Loaded!");
52
+ });
53
+
54
+ body
55
+ .container-fluid
56
+ .jumbotron
57
+ .pull-right = dummy_edit_button
58
+ h1 = first_attribute(document.xpath('//knart:knowledgeDocument/knart:metadata/knart:title', knart: 'urn:hl7-org:knowledgeartifact:r1'), 'value')
59
+ p = first_attribute(document.xpath('//knart:knowledgeDocument/knart:metadata/knart:description', knart: 'urn:hl7-org:knowledgeartifact:r1'), 'value')
60
+ / h2 Additional Metadata
61
+ dl.dl-horizontal
62
+ dt Schema
63
+ dd #{document.xpath('//knart:knowledgeDocument/knart:metadata/knart:schemaIdentifier', knart: 'urn:hl7-org:knowledgeartifact:r1').first['root']}
64
+ dt Identifier(s)
65
+ dd
66
+ - document.xpath('//knart:knowledgeDocument/knart:metadata/knart:identifiers/knart:identifier', knart: 'urn:hl7-org:knowledgeartifact:r1').each do |i|
67
+ span = i['root']
68
+ i
69
+ | (version
70
+ = i['version']
71
+ | )
72
+ dt Status
73
+ dd #{document.xpath('//knart:knowledgeDocument/knart:metadata/knart:status', knart: 'urn:hl7-org:knowledgeartifact:r1').first['value']}
74
+
75
+ .row
76
+ #applicability.col-lg-6
77
+ .stuff
78
+ h2
79
+ | Applicability
80
+ = dummy_add_button
81
+ hr
82
+ table.table.table-condensed.table-striped
83
+ thead
84
+ tr
85
+ th Focus
86
+ th Code
87
+ th System
88
+ th Name
89
+ th Actions
90
+ tbody
91
+ - document.xpath('//knart:knowledgeDocument/knart:metadata/knart:applicability/knart:coverage', knart: 'urn:hl7-org:knowledgeartifact:r1').each do |c|
92
+ tr
93
+ td = c.xpath('./knart:focus', knart: 'urn:hl7-org:knowledgeartifact:r1').first['value']
94
+ td = c.xpath('./knart:value', knart: 'urn:hl7-org:knowledgeartifact:r1').first['code']
95
+ td = c.xpath('./knart:value', knart: 'urn:hl7-org:knowledgeartifact:r1').first['codeSystem']
96
+ td = c.xpath('./knart:value/dt:displayName', knart: 'urn:hl7-org:knowledgeartifact:r1', dt: 'urn:hl7-org:cdsdt:r2').first['value']
97
+ td = dummy_edit_and_delete
98
+
99
+ #contributors.col-lg-6
100
+ .stuff
101
+ h2
102
+ | Contributors
103
+ = dummy_add_button
104
+ hr
105
+ .row
106
+ - document.xpath('//knart:knowledgeDocument/knart:metadata/knart:contributions/knart:contribution', knart: 'urn:hl7-org:knowledgeartifact:r1').each do |c|
107
+ .col-sm-6
108
+ .well
109
+ h4
110
+ div.pull-right = dummy_edit_and_delete
111
+ - given = c.xpath('./knart:contributor/knart:name/dt:part[@type="GIV"]', knart: 'urn:hl7-org:knowledgeartifact:r1', dt: 'urn:hl7-org:cdsdt:r2').first
112
+ = given ? given['value'] : nil
113
+ | &nbsp;
114
+ - family = c.xpath('./knart:contributor/knart:name/dt:part[@type="FAM"]', knart: 'urn:hl7-org:knowledgeartifact:r1', dt: 'urn:hl7-org:cdsdt:r2').first
115
+ = family ? family['value'] : nil
116
+ small
117
+ i
118
+ | &nbsp;(
119
+ = c.xpath('./knart:role', knart: 'urn:hl7-org:knowledgeartifact:r1').first['value']
120
+ | )
121
+ - c.xpath('./knart:contributor/knart:addresses/knart:address', knart: 'urn:hl7-org:knowledgeartifact:r1').each do |a|
122
+ address
123
+ b = a.xpath('./dt:part[@type="SAL"]', knart: 'urn:hl7-org:knowledgeartifact:r1', dt: 'urn:hl7-org:cdsdt:r2').first['value']
124
+ br
125
+ = a.xpath('./dt:part[@type="CTY"]', knart: 'urn:hl7-org:knowledgeartifact:r1', dt: 'urn:hl7-org:cdsdt:r2').first['value']
126
+ | ,
127
+ = a.xpath('./dt:part[@type="STA"]', knart: 'urn:hl7-org:knowledgeartifact:r1', dt: 'urn:hl7-org:cdsdt:r2').first['value']
128
+ | ,
129
+ = a.xpath('./dt:part[@type="ZIP"]', knart: 'urn:hl7-org:knowledgeartifact:r1', dt: 'urn:hl7-org:cdsdt:r2').first['value']
130
+ ul
131
+ - c.xpath('./knart:contributor/knart:contacts/knart:contact', knart: 'urn:hl7-org:knowledgeartifact:r1').each do |contact|
132
+ li
133
+ a href="#{contact['value']}" = contact['value']
134
+
135
+ #actions.col-lg-12
136
+ .stuff.
137
+ h2
138
+ | Information Collection Actions
139
+ = dummy_add_button
140
+ / hr
141
+ form.form-horizontal
142
+ - root_ag = document.xpath('//knart:knowledgeDocument/knart:actionGroup', knart: 'urn:hl7-org:knowledgeartifact:r1')
143
+ - ag = Knartform::ActionGroup.new
144
+ - ag.document = document
145
+ - ag.node = root_ag
146
+ - ag.knart = self
147
+ = ag.to_html
148
+
149
+ footer.col-lg-12.text-center
150
+ hr
151
+ small.help-block
152
+ | By Preston Lee. All rights reserved.
@@ -0,0 +1,4 @@
1
+ .pull-right
2
+ button class="btn btn-large btn-success"
3
+ span.glyphicon.glyphicon-plus
4
+ | Add
@@ -0,0 +1,3 @@
1
+ .pull-left
2
+ / button class="btn btn-large btn-default"
3
+ span.glyphicon.glyphicon-align-justify
@@ -0,0 +1,5 @@
1
+ .btn-group.btn-group-xs
2
+ button class="btn btn-default"
3
+ span.glyphicon.glyphicon-pencil
4
+ button class="btn btn-default"
5
+ span.glyphicon.glyphicon-trash
@@ -0,0 +1,4 @@
1
+ .pull-right
2
+ button class="btn btn-large btn-default"
3
+ span.glyphicon.glyphicon-pencil
4
+ | Edit
@@ -0,0 +1,4 @@
1
+ doctype html
2
+ html[lang="en"]
3
+ body
4
+ p This artifactType "" is not supported, sorry!
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: knartform
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.0
5
+ platform: ruby
6
+ authors:
7
+ - Preston Lee
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-02-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: nokogiri
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: httparty
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: slim
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Tools form working with HL7 CDS Knowledge Artifacts.
98
+ email: preston.lee@prestonlee.com
99
+ executables:
100
+ - audit_manifest
101
+ - batch_validation
102
+ - composite_graphs
103
+ - composite_to_dot
104
+ - knartform
105
+ - manifest_to_cds_connect
106
+ - spot_check
107
+ - update_manifest
108
+ extensions: []
109
+ extra_rdoc_files: []
110
+ files:
111
+ - ".gitignore"
112
+ - Gemfile
113
+ - Gemfile.lock
114
+ - bin/audit_manifest
115
+ - bin/batch_validation
116
+ - bin/composite_graphs
117
+ - bin/composite_to_dot
118
+ - bin/knartform
119
+ - bin/manifest_to_cds_connect
120
+ - bin/spot_check
121
+ - bin/update_manifest
122
+ - knartform.gemspec
123
+ - lib/common.rb
124
+ - lib/knartform.rb
125
+ - lib/knartform/action_group.rb
126
+ - lib/knartform/knart.rb
127
+ - lib/metadata.slim
128
+ - lib/spot_check.slim
129
+ - lib/views/action_group.slim
130
+ - lib/views/documentation_template.slim
131
+ - lib/views/dummy_add_button.slim
132
+ - lib/views/dummy_drag_control.slim
133
+ - lib/views/dummy_edit_and_delete.slim
134
+ - lib/views/dummy_edit_button.slim
135
+ - lib/views/unsupported.slim
136
+ homepage: https://github.com/preston/knartform
137
+ licenses:
138
+ - MIT
139
+ metadata: {}
140
+ post_install_message:
141
+ rdoc_options: []
142
+ require_paths:
143
+ - lib
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ requirements: []
155
+ rubygems_version: 3.0.1
156
+ signing_key:
157
+ specification_version: 4
158
+ summary: HL7 CDS Knowledge Artifacts
159
+ test_files: []