his_emr_api_radiology 0.0.2 → 0.0.3
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a735c1b85659230dc78dabe513a515c3d8e6414e5b07aaf52520fbb5e220ee0
|
4
|
+
data.tar.gz: d41d73146551ff5b755a63c5990e916342302c95f39bd842e0f4d640b77f2e50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66c2dab2f6776d6f1662d1cf1a6cf06b6f5390f6e4aba9442d60d5644bee3f7ba25bc73fd62d166d291b9e9472843480a519ee2a87a19460d7d63091781a91b0
|
7
|
+
data.tar.gz: 5e1c592d2a6238ba937becd1edde5ecdde0a293799792fff45f1552ef4a88e5afde73c119f4a552702d3c0ff562179da5ad31e6d18cdc79b5c43e7602674b6b5
|
@@ -1,11 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
require 'zebra_printer/init'
|
3
|
+
class Radiology::RadiologyOrdersController < ::ApplicationController
|
4
|
+
before_action :authenticate, except: %i[print_order_label ]
|
3
5
|
def create
|
4
6
|
patient_details, physician_details, radiology_orders = params.require %i[patient_details physician_details radiology_orders]
|
5
7
|
radiology_orders = service.generate_msi(patient_details,physician_details, radiology_orders)
|
6
8
|
render json: radiology_orders, status: :created
|
7
9
|
end
|
8
|
-
|
10
|
+
def print_order_label
|
11
|
+
label = service.print_radiology_barcode(params[:accession_number],params[:patient_national_id], params[:patient_name], params[:radio_order], params[:date_created])
|
12
|
+
send_data(label, type: 'application/label; charset=utf-8',
|
13
|
+
stream: false,
|
14
|
+
filename: "#{SecureRandom.hex(24)}.lbl",
|
15
|
+
disposition: 'inline')
|
16
|
+
end
|
9
17
|
def service
|
10
18
|
Radiology::RadiologyService
|
11
19
|
end
|
data/config/routes.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Radiology::Engine.routes.draw do
|
2
|
-
resources :radiology, path: 'api/v1/radiology'
|
2
|
+
resources :radiology, path: 'api/v1/radiology/radiology_orders'
|
3
3
|
resources :radiology_properties, path: 'api/v1/radiology_properties'
|
4
4
|
|
5
|
-
get '/api/v1/radiology/barcode', to: '
|
5
|
+
get '/api/v1/radiology/barcode', to: 'radiology#print_order_label'
|
6
6
|
|
7
7
|
end
|
data/lib/radiology/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: his_emr_api_radiology
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- petros
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -217,7 +217,6 @@ files:
|
|
217
217
|
- README.md
|
218
218
|
- Rakefile
|
219
219
|
- app/controllers/radiology/application_controller.rb
|
220
|
-
- app/controllers/radiology/labels_controller.rb
|
221
220
|
- app/controllers/radiology/radiology_controller.rb
|
222
221
|
- app/controllers/radiology/radiology_properties_controller.rb
|
223
222
|
- app/helpers/radiology/application_helper.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Radiology
|
4
|
-
class LabelsController < ApplicationController
|
5
|
-
skip_before_action :authenticate
|
6
|
-
|
7
|
-
def print_order_label
|
8
|
-
label = service.print_radiology_barcode(params[:accession_number],params[:patient_national_id], params[:patient_name], params[:radio_order], params[:date_created])
|
9
|
-
send_data(label.print, type: 'application/label; charset=utf-8',
|
10
|
-
stream: false,
|
11
|
-
filename: "#{SecureRandom.hex(24)}.lbl",
|
12
|
-
disposition: 'inline')
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|