Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
karname-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Reza Sahebgharan
karname-ui
Commits
f6791526
Commit
f6791526
authored
Dec 18, 2019
by
Reza Sahebgharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(HisLink UI and Back): write HISLink UI and Backend
parent
415dc979
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
340 additions
and
58 deletions
+340
-58
README.md
README.md
+3
-1
AppFooter.vue
client/components/AppFooter.vue
+6
-8
DeviceMap.vue
client/components/DeviceMap.vue
+14
-0
HisLink.vue
client/components/HisLink.vue
+0
-0
Worklist.vue
client/components/Worklist.vue
+14
-14
i18n.js
client/plugins/i18n.js
+16
-0
routes.js
client/plugins/routes.js
+10
-0
Main.vue
client/views/Main.vue
+33
-10
docker-compose.yml
docker-compose.yml
+7
-7
brands.js
imports/api/collections/brands.js
+14
-0
hislink.js
imports/api/collections/hislink.js
+14
-0
worklistItemSchema.js
imports/api/collections/worklistItemSchema.js
+4
-1
brands.js
imports/api/methods/brands.js
+28
-0
devicecode.js
imports/api/methods/devicecode.js
+0
-1
hisLink.js
imports/api/methods/hisLink.js
+142
-0
worklist.js
imports/api/methods/worklist.js
+4
-13
brands.js
imports/api/server/publications/brands.js
+10
-0
hislink.js
imports/api/server/publications/hislink.js
+10
-0
package.json
package.json
+3
-2
main.js
server/main.js
+5
-0
settings.json
settings.json
+3
-1
No files found.
README.md
View file @
f6791526
## Prerequisite
-
windows version must be 1809
and above
.
-
windows version must be 1809.
-
enable hyper-v and container on windows features
-
install docker for desktop on windows
-
go to icon tray on windows and right click on docker icon, then click on option 'switch to windows containers...'
...
...
@@ -49,6 +49,8 @@ services:
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker"}'
mongo:
ports:
- '27017:27017'
image: repo.marcopacs.com/karname/mongo-windows
volumes:
- D:\data\db:C:\data\db
...
...
client/components/AppFooter.vue
View file @
f6791526
...
...
@@ -6,10 +6,10 @@
elevation=
"24"
class=
"d-flex justify-center align-center text-center red--text"
>
<v-card-text>
</v-card-text>
<v-menu
transition=
"slide-x-transition"
>
<h5>
©2005-
{{
new
Date
().
getFullYear
()
}}
MARCO PACS
</h5>
<
!--
<
v-menu
transition=
"slide-x-transition"
>
<template
v-slot:activator=
"
{ on }">
<v-btn
class=
"changeLangBtn"
...
...
@@ -25,8 +25,8 @@
<v-list-item-title>
{{lng.name}}
</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<h5>
©2005-{{ new Date().getFullYear() }} MARCO PACS
</h5>
</v-menu>
-->
</v-footer>
</template>
...
...
@@ -55,4 +55,3 @@ export default {
}
</
style
>
</style>
\ No newline at end of file
client/components/DeviceMap.vue
0 → 100644
View file @
f6791526
<
template
>
<div>
DeviceMap
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
client/components/HisLink.vue
0 → 100644
View file @
f6791526
This diff is collapsed.
Click to expand it.
client/components/Worklist.vue
View file @
f6791526
...
...
@@ -17,8 +17,8 @@
clearable
dense
class=
"ma-4"
item-text=
"
Text
"
item-value=
"
Valu
e"
item-text=
"
GroupName
"
item-value=
"
GroupNam
e"
return-object
>
<template
v-if=
"noDataCombo"
v-slot:no-data
>
...
...
@@ -441,7 +441,6 @@
<div
class=
"v-data-table__mobile-row__header"
>
EnglishFirstName
</div>
<div
class=
"v-data-table__mobile-row__cell"
>
<v-btn
:class=
"
{
'red--text': item.EnglishFirstName.includes('?'),
'blue--text':!item.EnglishFirstName.includes('?'),
...
...
@@ -459,7 +458,6 @@
<div
class=
"v-data-table__mobile-row__header"
>
EnglishLastName
</div>
<div
class=
"v-data-table__mobile-row__cell"
>
<v-btn
:class=
"
{
'red--text': item.EnglishLastName.includes('?'),
'blue--text':!item.EnglishLastName.includes('?'),
...
...
@@ -547,11 +545,11 @@ export default {
// this.$set(item, "selected", true);
},
searchPatients
()
{
if
(
this
.
selectedDevice
&&
this
.
devicemap
!=
this
.
selectedDevice
.
Value
)
{
debugger
if
(
this
.
selectedDevice
&&
this
.
devicemap
!=
this
.
selectedDevice
.
GroupName
)
{
let
self
=
this
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Value
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
Value
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
GroupName
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
GroupName
;
});
}
...
...
@@ -680,7 +678,7 @@ export default {
});
let
{
selected
,
...
selectedItemClone
}
=
this
.
selectedItem
;
debugger
this
.
editLoading
=
true
;
let
self
=
this
;
Meteor
.
call
(
"EditworklistItem"
,
selectedItemClone
,
function
(
...
...
@@ -688,8 +686,6 @@ export default {
result
)
{
self
.
editLoading
=
false
;
console
.
log
(
result
);
//alert(error);
});
}
},
...
...
@@ -731,6 +727,9 @@ export default {
},
computed
:
{
deviceCodeItems
()
{
// return this.devicecode.map(device => {
// return device.GroupName;
// });
return
this
.
devicecode
;
},
headerOfTable
()
{
...
...
@@ -800,11 +799,12 @@ export default {
watch
:
{
"$subReady.worklist"
(
ready
)
{},
selectedDevice
(
newDevice
,
oldDevice
)
{
if
(
this
.
selectedDevice
&&
this
.
selectedDevice
.
Value
)
{
debugger
if
(
this
.
selectedDevice
&&
this
.
selectedDevice
.
GroupName
)
{
let
self
=
this
;
this
.
fetchWorklistLoading
=
true
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Valu
e
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
Valu
e
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
GroupNam
e
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
GroupNam
e
;
self
.
fetchWorklistLoading
=
false
;
});
}
...
...
client/plugins/i18n.js
View file @
f6791526
...
...
@@ -68,6 +68,14 @@ const messages = {
AllBtn
:
"All"
,
UnknownBtn
:
"Correction Needed"
,
noDevicemap
:
'no device'
},
HISLink
:
{
newBtn
:
"New"
,
editBtn
:
"Edit"
,
deleteBtn
:
"Delete"
,
activeBtn
:
"Active"
,
deactiveBtn
:
"Deactive"
,
authenticateBtn
:
"Authenticate"
}
},
...
...
@@ -136,6 +144,14 @@ const messages = {
AllBtn
:
"همه"
,
UnknownBtn
:
"نیازمند اصلاح"
,
noDevicemap
:
'دستگاه انتخاب نشده است'
},
HISLink
:
{
newBtn
:
"جدید"
,
editBtn
:
"ویرایش"
,
deleteBtn
:
"حذف"
,
activeBtn
:
"فعال"
,
deactiveBtn
:
"غیرفعال"
,
authenticateBtn
:
"تصدیق کردن"
}
}
...
...
client/plugins/routes.js
View file @
f6791526
...
...
@@ -100,6 +100,8 @@ import Main from '../views/Main.vue';
import
EditWorkList
from
'../components/EditWorkList.vue'
;
import
WorkList
from
'../components/Worklist.vue'
;
import
HisLink
from
'../components/HisLink.vue'
;
import
DeviceMap
from
'../components/DeviceMap.vue'
;
import
AppVersion
from
'../views/AppVersion.vue'
;
...
...
@@ -138,6 +140,14 @@ const routes = [{
default
:
WorkList
,
edit_worklist
:
EditWorkList
}
},
{
path
:
"hislink"
,
name
:
"hislink"
,
component
:
HisLink
},
{
path
:
"devicemap"
,
name
:
"devicemap"
,
component
:
DeviceMap
}]
}
];
...
...
client/views/Main.vue
View file @
f6791526
...
...
@@ -18,14 +18,14 @@
<router-view
name=
"edit_worklist"
></router-view>
</keep-alive>
-->
<v-app-bar
app
clipped-
righ
t
color=
"teal lighten-3"
dark
>
<v-app-bar
app
clipped-
lef
t
color=
"teal lighten-3"
dark
>
<v-toolbar-title
class=
"red--text"
>
Karname
</v-toolbar-title>
<!--
<v-app-bar-nav-icon
@
click
.
stop=
"drawer = !drawer"
></v-app-bar-nav-icon>
-->
<v-spacer></v-spacer>
<!--
<v-app-bar-nav-icon
@
click
.
stop=
"drawerRight = !drawerRight"
></v-app-bar-nav-icon>
-->
</v-app-bar>
<!--
<v-navigation-drawer
v-model=
"drawer"
app
>
<!--
<v-navigation-drawer
v-model=
"drawer"
app
clipped
>
<v-list
dense
>
<v-list-item
@
click
.
stop=
"left = !left"
>
<v-list-item-action>
...
...
@@ -37,6 +37,22 @@
</v-list-item>
</v-list>
left
</v-navigation-drawer>
-->
<v-navigation-drawer
v-model=
"drawer"
app
clipped
>
<v-list
nav
dense
>
<v-list-item-group
v-model=
"item"
color=
"primary"
>
<v-list-item
v-for=
"(item, i) in items"
:key=
"i"
:to=
"item.url"
>
<!--
<v-list-item-icon>
<v-icon
v-text=
"item.icon"
></v-icon>
</v-list-item-icon>
-->
<v-list-item-content>
<v-list-item-title
v-text=
"item.text"
></v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list-item-group>
</v-list>
</v-navigation-drawer>
</
template
>
<!-- <template v-if="$vuetify.rtl">
...
...
@@ -74,14 +90,13 @@
</v-navigation-drawer>
</template>-->
<v-navigation-drawer
v-model=
"left"
fixed
temporary
></v-navigation-drawer>
<v-content>
<router-view></router-view>
</v-content>
<!-- <v-navigation-drawer v-model="left" fixed temporary></v-navigation-drawer> -->
<v-navigation-drawer
v-model=
"right"
fixed
right
temporary
></v-navigation-drawer>
<v-content>
<router-view></router-view>
</v-content>
<!-- <v-navigation-drawer v-model="right" fixed right temporary></v-navigation-drawer> -->
<app-footer></app-footer>
</v-app>
...
...
@@ -102,7 +117,14 @@ export default {
drawer
:
null
,
drawerRight
:
null
,
right
:
false
,
left
:
false
left
:
false
,
item
:
0
,
items
:
[
{
text
:
"Worklist"
,
url
:
"/main/worklist"
,
icon
:
"mdi-folder"
},
{
text
:
"HISLink"
,
url
:
"/main/hislink"
,
icon
:
"mdi-account-multiple"
},
{
text
:
"DeviceMap"
,
url
:
"/main/devicemap"
,
icon
:
"mdi-star"
},
]
})
};
</
script
>
\ No newline at end of file
docker-compose.yml
View file @
f6791526
version
:
'
3'
version
:
"
3"
services
:
app
:
container_name
:
karname-app
restart
:
always
image
:
'
karname-app:${TAG_VERSION}'
image
:
"
karname-app:${TAG_VERSION}"
ports
:
-
'
80:3000'
-
"
80:3000"
depends_on
:
-
mongo
links
:
links
:
-
mongo
environment
:
ROOT_URL
:
${APP_ROOT_URL:-http://localhost}
MONGO_URL
:
mongodb://mongo:27017/karname
PORT
:
3000
METEOR_SETTINGS
:
'
{"worklistUrl":"http://karname-broker"}'
METEOR_SETTINGS
:
'
{"worklistUrl":"http://karname-broker"
,"databusUrl":"http://databus"
}'
mongo
:
container_name
:
mongo-windows
image
:
repo.marcopacs.com/karname/mongo-windows
volumes
:
-
C:\data\db:C:\data\db
volumes
:
data
:
networks
:
default
:
external
:
...
...
imports/api/collections/brands.js
0 → 100644
View file @
f6791526
import
{
Mongo
}
from
'meteor/mongo'
;
import
{
Meteor
}
from
'meteor/meteor'
;
let
Brands
;
if
(
Meteor
.
isClient
||
Meteor
.
isCordova
)
{
Brands
=
new
Mongo
.
Collection
(
'brands'
);
}
if
(
Meteor
.
isServer
)
{
Brands
=
new
Mongo
.
Collection
(
'brands'
,
{
connection
:
null
});
}
export
default
Brands
;
\ No newline at end of file
imports/api/collections/hislink.js
0 → 100644
View file @
f6791526
import
{
Mongo
}
from
'meteor/mongo'
;
import
{
Meteor
}
from
'meteor/meteor'
;
let
HisLink
;
if
(
Meteor
.
isClient
||
Meteor
.
isCordova
)
{
HisLink
=
new
Mongo
.
Collection
(
'HisLink'
)
}
if
(
Meteor
.
isServer
)
{
HisLink
=
new
Mongo
.
Collection
(
'HisLink'
)
}
export
default
HisLink
;
\ No newline at end of file
imports/api/collections/worklistItemSchema.js
View file @
f6791526
...
...
@@ -31,7 +31,9 @@ const workListItemSchema = new SimpleSchema({
"RequestedProcedureID"
:
SimpleSchema
.
oneOf
(
String
,
Number
),
"ScheduledStartDate"
:
SimpleSchema
.
oneOf
(
String
,
Number
),
"Smoking"
:
Number
,
"StudyInstanceUID"
:
String
"StudyInstanceUID"
:
String
,
"Status"
:
Number
,
"UniqueHash"
:
String
},
{
requiredByDefault
:
false
});
export
default
workListItemSchema
;
\ No newline at end of file
imports/api/methods/brands.js
0 → 100644
View file @
f6791526
import
{
Meteor
}
from
'meteor/meteor'
;
import
{
check
}
from
'meteor/check'
;
import
{
HTTP
}
from
'meteor/http'
;
import
Brands
from
'../collections/brands.js'
;
Meteor
.
methods
({
'getBrands'
()
{
debugger
;
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
const
result
=
HTTP
.
call
(
'GET'
,
`
${
Meteor
.
settings
.
worklistUrl
}
/HISIntegration.svc/rest/GetHISBrandsRest`
);
// const result = HTTP.call("GET", "http://192.168.2.105/Broker/HISIntegration.svc/rest/GetHISBrandsRest");
let
brandsHttpResult
=
JSON
.
parse
(
result
.
content
);
Brands
.
remove
({});
brandsHttpResult
.
Items
.
forEach
((
brand
)
=>
{
Brands
.
insert
({
...
brand
});
});
return
true
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
return
false
;
}
}
}
});
\ No newline at end of file
imports/api/methods/devicecode.js
View file @
f6791526
...
...
@@ -4,7 +4,6 @@ import { HTTP } from 'meteor/http';
import
DeviceCode
from
'../collections/devicecode.js'
;
Meteor
.
methods
({
'getDeviceCodes'
()
{
debugger
;
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
...
...
imports/api/methods/hisLink.js
0 → 100644
View file @
f6791526
import
{
Meteor
}
from
'meteor/meteor'
;
import
{
check
}
from
'meteor/check'
;
import
{
HTTP
}
from
'meteor/http'
;
Meteor
.
methods
({
'createHisLink'
(
item
)
{
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
let
options
=
{
data
:
item
,
headers
:
{
'content-type'
:
'application/json'
,
'Accept'
:
'application/json'
}
}
const
result
=
HTTP
.
call
(
"POST"
,
`
${
Meteor
.
settings
.
databusUrl
}
/hislink/create`
,
options
);
return
true
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console
.
log
(
e
)
return
false
;
}
}
},
"editHisLink"
(
item
)
{
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
let
options
=
{
data
:
item
,
headers
:
{
'content-type'
:
'application/json'
,
'Accept'
:
'application/json'
}
}
const
result
=
HTTP
.
call
(
"POST"
,
`
${
Meteor
.
settings
.
databusUrl
}
/hislink/update`
,
options
);
return
true
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console
.
log
(
e
)
return
false
;
}
}
},
"deleteHisLink"
(
item
)
{
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
let
options
=
{
data
:
item
,
headers
:
{
'content-type'
:
'application/json'
,
'Accept'
:
'application/json'
}
}
const
result
=
HTTP
.
call
(
"POST"
,
`
${
Meteor
.
settings
.
databusUrl
}
/hislink/delete`
,
options
);
return
true
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console
.
log
(
e
)
return
false
;
}
}
},
"activeHisLink"
(
item
)
{
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
let
options
=
{
data
:
item
,
headers
:
{
'content-type'
:
'application/json'
,
'Accept'
:
'application/json'
}
}
const
result
=
HTTP
.
call
(
"POST"
,
`
${
Meteor
.
settings
.
databusUrl
}
/hislink/active`
,
options
);
return
true
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console
.
log
(
e
)
return
false
;
}
}
},
"deactiveHisLink"
(
item
)
{
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
let
options
=
{
data
:
item
,
headers
:
{
'content-type'
:
'application/json'
,
'Accept'
:
'application/json'
}
}
const
result
=
HTTP
.
call
(
"POST"
,
`
${
Meteor
.
settings
.
databusUrl
}
/hislink/deactive`
,
options
);
return
true
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console
.
log
(
e
)
return
false
;
}
}
},
"authenticateHisLink"
(
item
)
{
this
.
unblock
();
if
(
this
.
userId
)
{
try
{
let
options
=
{
data
:
item
,
headers
:
{
'content-type'
:
'application/json'
,
'Accept'
:
'application/json'
}
}
const
result
=
HTTP
.
call
(
"POST"
,
`
${
Meteor
.
settings
.
databusUrl
}
/hislink/authenticate`
,
options
);
return
result
;
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
console
.
log
(
e
)
throw
new
Meteor
.
Error
(
500
,
"error"
);
}
}
}
});
\ No newline at end of file
imports/api/methods/worklist.js
View file @
f6791526
...
...
@@ -14,7 +14,7 @@ import workListItemSchema from '../collections/worklistItemSchema.js';
Meteor
.
methods
({
'Fetchworklist'
(
devicemap
)
{
debugger
check
(
devicemap
,
String
);
this
.
unblock
();
if
(
this
.
userId
)
{
...
...
@@ -86,7 +86,6 @@ Meteor.methods({
if
(
this
.
userId
)
{
delete
item
.
_id
;
workListItemSchema
.
validate
(
item
);
var
options
=
{
data
:
item
,
headers
:
{
...
...
@@ -94,19 +93,12 @@ Meteor.methods({
'Accept'
:
'application/json'
}
}
const
result
=
HTTP
.
call
(
'POST'
,
`
${
Meteor
.
settings
.
worklistUrl
}
/HISIntegration.svc/rest/EditworklistItem`
,
options
);
// console.log(result);
let
update
=
Worklist
.
update
({
AdmissionID
:
item
.
AdmissionID
},
{
$set
:
JSON
.
parse
(
result
.
content
)
});
console
.
log
(
update
);
let
result1
=
JSON
.
parse
(
result
.
content
);
delete
result1
.
_id
;
let
update
=
Worklist
.
update
({
AdmissionID
:
item
.
AdmissionID
},
{
$set
:
result1
});
return
true
;
}
// }
// catch (e) {
// }
}
});
\ No newline at end of file
imports/api/server/publications/brands.js
0 → 100644
View file @
f6791526
import
Brands
from
'../../collections/brands.js'
;
import
{
check
}
from
'meteor/check'
;
Meteor
.
publish
(
"brands"
,
function
()
{
if
(
!
this
.
userId
)
{
return
this
.
ready
();
}
return
Brands
.
find
({});
});
\ No newline at end of file
imports/api/server/publications/hislink.js
0 → 100644
View file @
f6791526
import
HisLink
from
'../../collections/hislink.js'
;
import
{
check
}
from
'meteor/check'
;
Meteor
.
publish
(
"hislink"
,
function
()
{
if
(
!
this
.
userId
)
{
return
this
.
ready
();
}
return
HisLink
.
find
({});
});
\ No newline at end of file
package.json
View file @
f6791526
...
...
@@ -3,7 +3,7 @@
"private"
:
true
,
"version"
:
"0.0.7"
,
"scripts"
:
{
"start"
:
"meteor run --inspect --settings settings.json"
,
"start"
:
"
SET MONGO_URL=mongodb://127.0.0.1:27017/karname&&
meteor run --inspect --settings settings.json"
,
"test"
:
"meteor test --once --driver-package meteortesting:mocha"
,
"test-app"
:
"TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha"
,
"test-jest"
:
"jest"
,
...
...
@@ -106,4 +106,4 @@
"!**/__mock__/**"
]
}
}
}
\ No newline at end of file
server/main.js
View file @
f6791526
...
...
@@ -3,8 +3,13 @@ import { Meteor } from 'meteor/meteor';
import
'../imports/api/methods/worklist.js'
;
import
'../imports/api/methods/changePassword.js'
;
import
'../imports/api/methods/devicecode.js'
;
import
'../imports/api/methods/brands.js'
;
import
'../imports/api/methods/hisLink.js'
;
import
'../imports/api/server/publications/worklist.js'
;
import
'../imports/api/server/publications/devicecode.js'
;
import
'../imports/api/server/publications/hislink.js'
;
import
'../imports/api/server/publications/brands.js'
Meteor
.
startup
(()
=>
{
...
...
settings.json
View file @
f6791526
{
"worklistUrl"
:
"http://staging.karname.ir:8086"
"worklistUrl"
:
"http://192.168.0.66:8086"
,
"databusUrl"
:
"http://localhost:8090"
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment