openeyes / oph-in-visualfields
能够与视觉域机器通信以导入图像的模块
Requires
This package is not auto-updated.
Last update: 2020-01-24 15:47:29 UTC
README
截至Openeyes版本1.12.1,此模块已合并到核心openeyes仓库中。
此仓库仅用于历史目的保留。
OphInVisualfields
此描述需要额外信息以填写导入标准字段部分。使用Openeyes Vagrant vm可能会帮助更快地运行以下旧版导入。
导入旧版事件:OpenEyes
要求
- 最新版本的OphInVisualfields模块和支持它的OpenEyes实例。
- OpenEyes已设置好,所有必要的模块已导入,并运行了必要的数据库迁移。
在OphInVisualfields/commands目录中的旧版导入脚本用于导入.fmes文件。有关命令的帮助,请从protected/运行
./yiic importlegacyvf help
参数与客户端执行的导入非常相似,只是选项名称不同
--importDir: specifies which directory to import legacy files from;
--archiveDir: move successfully imported measurements to specified directory;
--errorDir: where to move files that were not successfully imported;
--dupDir: where to place files that have already been imported to OpenEyes
--interval: an acceptable time span that exists between tests for a given patient; specified as a PHP time interval (e.g. PT1H30M);
创建导入过程所需的文件夹
1 - ssh the VM - vagrant ssh
2 - Create directories
cd /var/www/protected; \
mkdir runtime/fields; \
mkdir runtime/fields/legacy; \
mkdir runtime/fields/out; \
mkdir runtime/fields/err; \
mkdir runtime/fields/dups;
3 - copy test legacy fmes files - cp modules/OphInVisualfields/tests/fields/legacy/* runtime/fields/legacy/
4 - These files have sample numbers that might not match your patient ID, change the number part in patient ids in the xml to map a user in your system
运行以下命令以导入旧版事件
./yiic importlegacyvf import --importDir=runtime/fields/legacy --archiveDir=runtime/fields/out --errorDir=runtime/fields/err --dupDir=runtime/fields/dups
注意,如果导入成功,旧版事件将出现在患者的“事件和病程”页面下的“旧版事件”中。此外,该命令还会通知每个尝试导入的结果
导入标准字段
(此部分未测试,仅作为未来参考)
所有旧版字段事件已导入后,可以导入标准字段(即非旧版字段)。标准导入的过程与旧版导入方法非常不同 - 标准字段通过HTTP发送到OpenEyes以访问OpenEyes API。
为了通过API导入字段,必须通过admin(localhost/admin)页面设置新用户。您可以使用当前用户,但最好为此任务设置一个专门的字段用户。这可以通过管理界面完成。创建用户时需要3个角色,API访问、管理员和用户。"医生"应选择"是"。需要更新config/local/common.php,使用'local_users' => array('admin','fields_user')。
同样,就像旧版导入一样,有几个文件夹用于对文件进行排序:-a(存档,成功传输的文件将移动到此处),-d(监视从字段机器到达的新文件的目录),-e(错误目录)和-u(重复目录),-t(外出 - 当由于网络错误而未发送文件时,它将被移动到这里以重新安排发送)。还有一些额外的参数需要考虑
-c,--credentials : 提供必要的用户名/密码(以逗号分隔);如果逗号后没有提供密码,则在运行过程时提示输入;-g,--global-search-path : 指定 ImageMagick 安装的位置;仅在 Windows 安装上必要。 -i,--interval : 检查 in 目录之间休眠的秒数。 -o,--image-options : 默认设置但可以进行参数化。指定 humphrey 测试的定位和提取段,包括缩放参数。格式:x,y,w,h,x1,y1,其中 x,y 是裁剪 wxh 大小图像的位置,缩放为 x1,y1。缩放参数 (x1,y1) 是可选的,可以省略。 -p,--port : 连接到服务器的端口。默认为 80。本地为 8888。-r,--regex : 用于确定有效患者标识符的正则表达式。默认为 ^([0-9]{1,9})$ -s,--host : 指定发送消息的服务器。 -t,--outgoing : 放置未成功发送的测量文件的目录。-u,--duplicates : 将重复文件(成功传输的)移动到该目录。-x,--xml-source: 将 XML 源文件信息与捕获数据一起包含。默认为 false。
例如,要将字段发送到名为 'openeyes' 的服务器,用户名为 fields_user,密码为 admin,且 ImageMagick 已安装在 ImageMagick-6.8.8-Q16,以下命令将导入 fields/in 中的所有文件并发送到服务器
sh target/appassembler/bin/fields -d fields/in -e fields/err -u fields/dups -a fields/out -t fields/resend -c fields_user,admin -s localhost -p 8888 注意,凭证也可以指定为 -c fields,密码将在命令行中提示输入。