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
## Prerequisite
-
windows version must be 1809
and above
.
-
windows version must be 1809.
-
enable hyper-v and container on windows features
-
enable hyper-v and container on windows features
-
install docker for desktop on windows
-
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...'
-
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:
...
@@ -49,6 +49,8 @@ services:
PORT: 3000
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker"}'
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker"}'
mongo:
mongo:
ports:
- '27017:27017'
image: repo.marcopacs.com/karname/mongo-windows
image: repo.marcopacs.com/karname/mongo-windows
volumes:
volumes:
- D:\data\db:C:\data\db
- D:\data\db:C:\data\db
...
...
client/components/AppFooter.vue
View file @
f6791526
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
elevation=
"24"
elevation=
"24"
class=
"d-flex justify-center align-center text-center red--text"
class=
"d-flex justify-center align-center text-center red--text"
>
>
<v-card-text>
<h5>
©2005-
{{
new
Date
().
getFullYear
()
}}
MARCO PACS
</h5>
</v-card-text>
<v-menu
transition=
"slide-x-transition"
>
<
!--
<
v-menu
transition=
"slide-x-transition"
>
<template
v-slot:activator=
"
{ on }">
<template
v-slot:activator=
"
{ on }">
<v-btn
<v-btn
class=
"changeLangBtn"
class=
"changeLangBtn"
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
<v-list-item-title>
{{lng.name}}
</v-list-item-title>
<v-list-item-title>
{{lng.name}}
</v-list-item-title>
</v-list-item>
</v-list-item>
</v-list>
</v-list>
</v-menu>
</v-menu>
-->
<h5>
©2005-{{ new Date().getFullYear() }} MARCO PACS
</h5>
</v-footer>
</v-footer>
</template>
</template>
...
@@ -55,4 +55,3 @@ export default {
...
@@ -55,4 +55,3 @@ export default {
}
}
</
style
>
</
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 @@
...
@@ -17,8 +17,8 @@
clearable
clearable
dense
dense
class=
"ma-4"
class=
"ma-4"
item-text=
"
Text
"
item-text=
"
GroupName
"
item-value=
"
Valu
e"
item-value=
"
GroupNam
e"
return-object
return-object
>
>
<template
v-if=
"noDataCombo"
v-slot:no-data
>
<template
v-if=
"noDataCombo"
v-slot:no-data
>
...
@@ -441,7 +441,6 @@
...
@@ -441,7 +441,6 @@
<div
class=
"v-data-table__mobile-row__header"
>
EnglishFirstName
</div>
<div
class=
"v-data-table__mobile-row__header"
>
EnglishFirstName
</div>
<div
class=
"v-data-table__mobile-row__cell"
>
<div
class=
"v-data-table__mobile-row__cell"
>
<v-btn
<v-btn
:class=
"
{
:class=
"
{
'red--text': item.EnglishFirstName.includes('?'),
'red--text': item.EnglishFirstName.includes('?'),
'blue--text':!item.EnglishFirstName.includes('?'),
'blue--text':!item.EnglishFirstName.includes('?'),
...
@@ -459,7 +458,6 @@
...
@@ -459,7 +458,6 @@
<div
class=
"v-data-table__mobile-row__header"
>
EnglishLastName
</div>
<div
class=
"v-data-table__mobile-row__header"
>
EnglishLastName
</div>
<div
class=
"v-data-table__mobile-row__cell"
>
<div
class=
"v-data-table__mobile-row__cell"
>
<v-btn
<v-btn
:class=
"
{
:class=
"
{
'red--text': item.EnglishLastName.includes('?'),
'red--text': item.EnglishLastName.includes('?'),
'blue--text':!item.EnglishLastName.includes('?'),
'blue--text':!item.EnglishLastName.includes('?'),
...
@@ -547,11 +545,11 @@ export default {
...
@@ -547,11 +545,11 @@ export default {
// this.$set(item, "selected", true);
// this.$set(item, "selected", true);
},
},
searchPatients
()
{
searchPatients
()
{
if
(
this
.
selectedDevice
&&
this
.
devicemap
!=
this
.
selectedDevice
.
Value
)
{
debugger
if
(
this
.
selectedDevice
&&
this
.
devicemap
!=
this
.
selectedDevice
.
GroupName
)
{
let
self
=
this
;
let
self
=
this
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
GroupName
,
function
()
{
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Value
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
GroupName
;
self
.
devicemap
=
self
.
selectedDevice
.
Value
;
});
});
}
}
...
@@ -680,7 +678,7 @@ export default {
...
@@ -680,7 +678,7 @@ export default {
});
});
let
{
selected
,
...
selectedItemClone
}
=
this
.
selectedItem
;
let
{
selected
,
...
selectedItemClone
}
=
this
.
selectedItem
;
debugger
this
.
editLoading
=
true
;
this
.
editLoading
=
true
;
let
self
=
this
;
let
self
=
this
;
Meteor
.
call
(
"EditworklistItem"
,
selectedItemClone
,
function
(
Meteor
.
call
(
"EditworklistItem"
,
selectedItemClone
,
function
(
...
@@ -688,8 +686,6 @@ export default {
...
@@ -688,8 +686,6 @@ export default {
result
result
)
{
)
{
self
.
editLoading
=
false
;
self
.
editLoading
=
false
;
console
.
log
(
result
);
//alert(error);
});
});
}
}
},
},
...
@@ -731,6 +727,9 @@ export default {
...
@@ -731,6 +727,9 @@ export default {
},
},
computed
:
{
computed
:
{
deviceCodeItems
()
{
deviceCodeItems
()
{
// return this.devicecode.map(device => {
// return device.GroupName;
// });
return
this
.
devicecode
;
return
this
.
devicecode
;
},
},
headerOfTable
()
{
headerOfTable
()
{
...
@@ -800,11 +799,12 @@ export default {
...
@@ -800,11 +799,12 @@ export default {
watch
:
{
watch
:
{
"$subReady.worklist"
(
ready
)
{},
"$subReady.worklist"
(
ready
)
{},
selectedDevice
(
newDevice
,
oldDevice
)
{
selectedDevice
(
newDevice
,
oldDevice
)
{
if
(
this
.
selectedDevice
&&
this
.
selectedDevice
.
Value
)
{
debugger
if
(
this
.
selectedDevice
&&
this
.
selectedDevice
.
GroupName
)
{
let
self
=
this
;
let
self
=
this
;
this
.
fetchWorklistLoading
=
true
;
this
.
fetchWorklistLoading
=
true
;
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
Valu
e
,
function
()
{
Meteor
.
call
(
"Fetchworklist"
,
this
.
selectedDevice
.
GroupNam
e
,
function
()
{
self
.
devicemap
=
self
.
selectedDevice
.
Valu
e
;
self
.
devicemap
=
self
.
selectedDevice
.
GroupNam
e
;
self
.
fetchWorklistLoading
=
false
;
self
.
fetchWorklistLoading
=
false
;
});
});
}
}
...
...
client/plugins/i18n.js
View file @
f6791526
...
@@ -68,6 +68,14 @@ const messages = {
...
@@ -68,6 +68,14 @@ const messages = {
AllBtn
:
"All"
,
AllBtn
:
"All"
,
UnknownBtn
:
"Correction Needed"
,
UnknownBtn
:
"Correction Needed"
,
noDevicemap
:
'no device'
noDevicemap
:
'no device'
},
HISLink
:
{
newBtn
:
"New"
,
editBtn
:
"Edit"
,
deleteBtn
:
"Delete"
,
activeBtn
:
"Active"
,
deactiveBtn
:
"Deactive"
,
authenticateBtn
:
"Authenticate"
}
}
},
},
...
@@ -136,6 +144,14 @@ const messages = {
...
@@ -136,6 +144,14 @@ const messages = {
AllBtn
:
"همه"
,
AllBtn
:
"همه"
,
UnknownBtn
:
"نیازمند اصلاح"
,
UnknownBtn
:
"نیازمند اصلاح"
,
noDevicemap
:
'دستگاه انتخاب نشده است'
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';
...
@@ -100,6 +100,8 @@ import Main from '../views/Main.vue';
import
EditWorkList
from
'../components/EditWorkList.vue'
;
import
EditWorkList
from
'../components/EditWorkList.vue'
;
import
WorkList
from
'../components/Worklist.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'
;
import
AppVersion
from
'../views/AppVersion.vue'
;
...
@@ -138,6 +140,14 @@ const routes = [{
...
@@ -138,6 +140,14 @@ const routes = [{
default
:
WorkList
,
default
:
WorkList
,
edit_worklist
:
EditWorkList
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 @@
...
@@ -18,14 +18,14 @@
<router-view
name=
"edit_worklist"
></router-view>
<router-view
name=
"edit_worklist"
></router-view>
</keep-alive>
-->
</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-toolbar-title
class=
"red--text"
>
Karname
</v-toolbar-title>
<!--
<v-app-bar-nav-icon
@
click
.
stop=
"drawer = !drawer"
></v-app-bar-nav-icon>
-->
<!--
<v-app-bar-nav-icon
@
click
.
stop=
"drawer = !drawer"
></v-app-bar-nav-icon>
-->
<v-spacer></v-spacer>
<v-spacer></v-spacer>
<!--
<v-app-bar-nav-icon
@
click
.
stop=
"drawerRight = !drawerRight"
></v-app-bar-nav-icon>
-->
<!--
<v-app-bar-nav-icon
@
click
.
stop=
"drawerRight = !drawerRight"
></v-app-bar-nav-icon>
-->
</v-app-bar>
</v-app-bar>
<!--
<v-navigation-drawer
v-model=
"drawer"
app
>
<!--
<v-navigation-drawer
v-model=
"drawer"
app
clipped
>
<v-list
dense
>
<v-list
dense
>
<v-list-item
@
click
.
stop=
"left = !left"
>
<v-list-item
@
click
.
stop=
"left = !left"
>
<v-list-item-action>
<v-list-item-action>
...
@@ -37,6 +37,22 @@
...
@@ -37,6 +37,22 @@
</v-list-item>
</v-list-item>
</v-list>
left
</v-list>
left
</v-navigation-drawer>
-->
</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
>
<!-- <template v-if="$vuetify.rtl">
<!-- <template v-if="$vuetify.rtl">
...
@@ -74,14 +90,13 @@
...
@@ -74,14 +90,13 @@
</v-navigation-drawer>
</v-navigation-drawer>
</template>-->
</template>-->
<v-navigation-drawer
v-model=
"left"
fixed
temporary
></v-navigation-drawer>
<!-- <v-navigation-drawer v-model="left" fixed temporary></v-navigation-drawer> -->
<v-content>
<router-view></router-view>
</v-content>
<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>
<app-footer></app-footer>
</v-app>
</v-app>
...
@@ -102,7 +117,14 @@ export default {
...
@@ -102,7 +117,14 @@ export default {
drawer
:
null
,
drawer
:
null
,
drawerRight
:
null
,
drawerRight
:
null
,
right
:
false
,
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
>
</
script
>
\ No newline at end of file
docker-compose.yml
View file @
f6791526
version
:
"
3"
version
:
'
3'
services
:
services
:
app
:
app
:
container_name
:
karname-app
container_name
:
karname-app
restart
:
always
restart
:
always
image
:
'
karname-app:${TAG_VERSION}'
image
:
"
karname-app:${TAG_VERSION}"
ports
:
ports
:
-
'
80:3000'
-
"
80:3000"
depends_on
:
depends_on
:
-
mongo
-
mongo
links
:
links
:
-
mongo
-
mongo
environment
:
environment
:
ROOT_URL
:
${APP_ROOT_URL:-http://localhost}
ROOT_URL
:
${APP_ROOT_URL:-http://localhost}
MONGO_URL
:
mongodb://mongo:27017/karname
MONGO_URL
:
mongodb://mongo:27017/karname
PORT
:
3000
PORT
:
3000
METEOR_SETTINGS
:
'
{"worklistUrl":"http://karname-broker"}'
METEOR_SETTINGS
:
'
{"worklistUrl":"http://karname-broker"
,"databusUrl":"http://databus"
}'
mongo
:
mongo
:
container_name
:
mongo-windows
image
:
repo.marcopacs.com/karname/mongo-windows
image
:
repo.marcopacs.com/karname/mongo-windows
volumes
:
volumes
:
-
C:\data\db:C:\data\db
-
C:\data\db:C:\data\db
volumes
:
volumes
:
data
:
data
:
networks
:
networks
:
default
:
default
:
external
:
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({
...
@@ -31,7 +31,9 @@ const workListItemSchema = new SimpleSchema({
"RequestedProcedureID"
:
SimpleSchema
.
oneOf
(
String
,
Number
),
"RequestedProcedureID"
:
SimpleSchema
.
oneOf
(
String
,
Number
),
"ScheduledStartDate"
:
SimpleSchema
.
oneOf
(
String
,
Number
),
"ScheduledStartDate"
:
SimpleSchema
.
oneOf
(
String
,
Number
),
"Smoking"
:
Number
,
"Smoking"
:
Number
,
"StudyInstanceUID"
:
String
"StudyInstanceUID"
:
String
,
"Status"
:
Number
,
"UniqueHash"
:
String
},
{
requiredByDefault
:
false
});
},
{
requiredByDefault
:
false
});
export
default
workListItemSchema
;
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';
...
@@ -4,7 +4,6 @@ import { HTTP } from 'meteor/http';
import
DeviceCode
from
'../collections/devicecode.js'
;
import
DeviceCode
from
'../collections/devicecode.js'
;
Meteor
.
methods
({
Meteor
.
methods
({
'getDeviceCodes'
()
{
'getDeviceCodes'
()
{
debugger
;
this
.
unblock
();
this
.
unblock
();
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
try
{
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';
...
@@ -14,7 +14,7 @@ import workListItemSchema from '../collections/worklistItemSchema.js';
Meteor
.
methods
({
Meteor
.
methods
({
'Fetchworklist'
(
devicemap
)
{
'Fetchworklist'
(
devicemap
)
{
debugger
check
(
devicemap
,
String
);
check
(
devicemap
,
String
);
this
.
unblock
();
this
.
unblock
();
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
...
@@ -86,7 +86,6 @@ Meteor.methods({
...
@@ -86,7 +86,6 @@ Meteor.methods({
if
(
this
.
userId
)
{
if
(
this
.
userId
)
{
delete
item
.
_id
;
delete
item
.
_id
;
workListItemSchema
.
validate
(
item
);
workListItemSchema
.
validate
(
item
);
var
options
=
{
var
options
=
{
data
:
item
,
data
:
item
,
headers
:
{
headers
:
{
...
@@ -94,19 +93,12 @@ Meteor.methods({
...
@@ -94,19 +93,12 @@ Meteor.methods({
'Accept'
:
'application/json'
'Accept'
:
'application/json'
}
}
}
}
const
result
=
HTTP
.
call
(
'POST'
,
`
${
Meteor
.
settings
.
worklistUrl
}
/HISIntegration.svc/rest/EditworklistItem`
,
options
);
const
result
=
HTTP
.
call
(
'POST'
,
`
${
Meteor
.
settings
.
worklistUrl
}
/HISIntegration.svc/rest/EditworklistItem`
,
options
);
// console.log(result);
let
result1
=
JSON
.
parse
(
result
.
content
);
delete
result1
.
_id
;
let
update
=
Worklist
.
update
({
AdmissionID
:
item
.
AdmissionID
},
{
$set
:
JSON
.
parse
(
result
.
content
)
});
let
update
=
Worklist
.
update
({
AdmissionID
:
item
.
AdmissionID
},
{
$set
:
result1
});
console
.
log
(
update
);
return
true
;
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 @@
...
@@ -3,7 +3,7 @@
"private"
:
true
,
"private"
:
true
,
"version"
:
"0.0.7"
,
"version"
:
"0.0.7"
,
"scripts"
:
{
"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"
:
"meteor test --once --driver-package meteortesting:mocha"
,
"test-app"
:
"TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha"
,
"test-app"
:
"TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha"
,
"test-jest"
:
"jest"
,
"test-jest"
:
"jest"
,
...
@@ -106,4 +106,4 @@
...
@@ -106,4 +106,4 @@
"!**/__mock__/**"
"!**/__mock__/**"
]
]
}
}
}
}
\ No newline at end of file
server/main.js
View file @
f6791526
...
@@ -3,8 +3,13 @@ import { Meteor } from 'meteor/meteor';
...
@@ -3,8 +3,13 @@ import { Meteor } from 'meteor/meteor';
import
'../imports/api/methods/worklist.js'
;
import
'../imports/api/methods/worklist.js'
;
import
'../imports/api/methods/changePassword.js'
;
import
'../imports/api/methods/changePassword.js'
;
import
'../imports/api/methods/devicecode.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/worklist.js'
;
import
'../imports/api/server/publications/devicecode.js'
;
import
'../imports/api/server/publications/devicecode.js'
;
import
'../imports/api/server/publications/hislink.js'
;
import
'../imports/api/server/publications/brands.js'
Meteor
.
startup
(()
=>
{
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