Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
8aaa4ce
readme file
matrix-amiel Dec 20, 2020
bd9a3a6
readme file
matrix-amiel Dec 20, 2020
d53ed91
readme file
matrix-amiel Dec 20, 2020
5ce1e21
readme file
matrix-amiel Dec 20, 2020
0e84b83
up modules versions
matrix-amiel Dec 20, 2020
727071e
Merge branch 'develop' of https://github.com/israeli-moh/clinikal-bac…
matrix-amiel Dec 20, 2020
3d8d7e6
fix EM-460
matrix-amiel Dec 28, 2020
7354b10
Merge pull request #58 from israeli-moh/fixbugs
matrix-amiel Dec 29, 2020
3353711
chage sql of valueset - performance issue
matrix-amiel Dec 29, 2020
79eff80
Merge branch 'develop' of https://github.com/israeli-moh/clinikal-bac…
matrix-amiel Dec 29, 2020
d8417d9
fix empty pdf page
matrix-amiel Dec 30, 2020
00d1531
add missing use statement
matrix-amiel Jan 11, 2021
491bd11
fixes - EM-463
matrix-amiel Jan 12, 2021
deb3197
fixes - EM-463
matrix-amiel Jan 12, 2021
6812d1b
Merge pull request #59 from israeli-moh/fixbugs
matrix-amiel Jan 16, 2021
c66589f
start point
matrix-amiel Jan 27, 2021
78a55a3
assign teplete to all reason codes PC-1399
matrix-amiel Jan 27, 2021
9d01c6c
merge develop
matrix-amiel Jan 27, 2021
32b6b07
list page - PC-1575 PC-1576
matrix-amiel Jan 31, 2021
7648e8d
assign template screen
matrix-amiel Feb 4, 2021
4c205ec
add/edit template screen
matrix-amiel Feb 7, 2021
324d50c
last fixes
matrix-amiel Feb 7, 2021
fc85cf4
add acl
matrix-amiel Feb 7, 2021
84741da
cleanup
matrix-amiel Feb 7, 2021
3dbed6c
Merge pull request #60 from israeli-moh/manageTemplates
matrix-amiel Feb 7, 2021
5cfd02b
add new queries to commitmrnt questionarie and ix report bug
matrix-amiel Feb 28, 2021
034e1b3
Merge pull request #61 from israeli-moh/withoutPaymentTab
matrix-amiel Mar 1, 2021
9133a0b
add language parameter to valueset
matrix-amiel Mar 3, 2021
adba0da
add forms settings
matrix-amiel Mar 3, 2021
f8047d5
Merge pull request #62 from israeli-moh/addValuesetLang
matrix-amiel Mar 3, 2021
418b1d0
add method for valueset
matrix-amiel Mar 11, 2021
fc819fb
Merge pull request #63 from israeli-moh/shosh_recommentaionForm
matrix-amiel Mar 13, 2021
5478001
cahnges in the indicator settings
matrix-amiel Mar 21, 2021
549d5b9
Merge pull request #64 from israeli-moh/shoshB
matrix-amiel Mar 21, 2021
628a974
enable pain sevirity 0
matrix-amiel Apr 7, 2021
60b3077
fix
matrix-amiel Apr 7, 2021
3cb3a54
add trim funtion
matrix-amiel Apr 8, 2021
75ec1fd
add mask for blood pressure
matrix-amiel Apr 8, 2021
2b4e960
Merge pull request #65 from israeli-moh/fixPainBug
matrix-amiel Apr 8, 2021
1d919ab
fix indicators in the summery letter
matrix-amiel Apr 10, 2021
4b9ea58
Merge branch 'fixPainBug' into develop
matrix-amiel Apr 10, 2021
d50dca6
fixes for english version
matrix-amiel Apr 13, 2021
f93a72b
Merge pull request #66 from israeli-moh/english_fixes
matrix-amiel Apr 13, 2021
2bfcd53
center logo
matrix-amiel Apr 18, 2021
095d5a4
Merge pull request #67 from israeli-moh/english_fixes
matrix-amiel Apr 18, 2021
736d73d
fix center logo
matrix-amiel Apr 20, 2021
867460c
Merge pull request #68 from israeli-moh/english_fixes
matrix-amiel Apr 20, 2021
e69815d
increase letter font
matrix-amiel May 2, 2021
2c1f10f
Merge pull request #69 from israeli-moh/english_fixes
matrix-amiel May 3, 2021
82a074e
add patien address to letters
matrix-amiel May 6, 2021
e9f5f67
Merge pull request #70 from israeli-moh/patientAdres
matrix-amiel May 6, 2021
080a5fe
show po box in the summary letter
May 26, 2021
9f5aa1d
Update README.md
matrix-amiel Jun 3, 2021
a7eb8cf
change reposiory in the composer file
Jun 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 34 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,34 @@
# Description
This repository contains modules that add functionality to Openemr.

# Installation
These instructions assume you have a working installation of Openemr.

Add the following to the openemr/composer.json:
``` json
"repositories": [
{
"type": "vcs",
"url": "git@github.com:israeli-moh/clinikal-backend.git"
},
{
"type": "vcs",
"url": "git@github.com:israeli-moh/composer-installers-clinikal-extender.git"
}
],
"require": {
"clinikal/clinikal-backend": "dev-master",
"clinikal/composer-installers-clinikal-extender": "dev-master"
},
"extra": {
"installer-types": [
"clinikal-vertical"
],
}
```

In a terminal, `cd` into the openemr root directory (where the composer.json is), and run:
```
composer update clinikal
```

This downloads the modules code into the openemr/vendor/clinikal and triggers the composer installer extension in the composer-installers-clinikal-extender repository.
The extension creates links from the files in vendor/clinikal to there appropriate places in the openemr codebase.
This enables us to use any modules, styles, and menus downloaded by composer into the vendor/clinikal directory.

All modules can now be registered and enabled in the Manage Modules screen.

This project is sponsored by the Israeli Ministry Of Health.
## What is clinikal?

Clinikal is a Electric Medical Records application.
Clinical offers a new experience of administrative and medical management for variety of clinics.
The foundation of the application is the popular open source [OpenEMR](https://github.com/openemr/openemr), we developed new layer of Fhir API base on ZF2 modules and new and modern React.js application to enjoy from wonderful user experience.
Clinikal continues to use OpenEMR interfaces as Content Management System for manage users, permissions, lists etc. (we doesn't supply compatibility with all Openemr screens)

The principle that guides us is **clean and clear**.
Each user sees only the screens and forms relevant to his role in the clinic.
This ability is caused by using a system of roles and privileges for each profession in the clinic and a different installation process for each medical field which creates an innovative and convenient user experience!

### Get started and documentation
To get started and documentation at https://clinikal-documentation.readthedocs.io/

### Clinikal-beckend
The product composed of a few component, Server-side modules and client-side application.
This repository is part of server-side components and contains several modules and configurations that common for all the medical fields in the system.
Main contents:
* API layer
* General functionality
* Custom menus
* Import data module
* More helpers

### Resources
* [Docker installation](https://clinikal-documentation.readthedocs.io/en/latest/get_started/docker_installation/)
* [Manual installation](https://clinikal-documentation.readthedocs.io/en/latest/get_started/openemr_modules/)
* [Internationalization](https://clinikal-documentation.readthedocs.io/en/latest/get_started/internationalization/)
* [FHIR API](https://clinikal-documentation.readthedocs.io/en/latest/api/fhir/)

### License
Please see the [license agreement](https://github.com/israeli-moh/clinikal-react/blob/develop/LICENSE).


2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"repositories": [
{
"type": "vcs",
"url": "git@github.com:israeli-moh/composer-installers-clinikal-extender.git"
"url": "git@github.com:MohGovIL/Clinical-composer-installers.git"
}
],
"require": {
Expand Down
18 changes: 18 additions & 0 deletions modules/ClinikalAPI/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,24 @@ public function initApi($m)

}

/**
* load global variables foe every controllers
* @param ModuleManager $manager
*/
public function init(ModuleManager $manager)
{
$events = $manager->getEventManager();
$sharedEvents = $events->getSharedManager();

$sharedEvents->attach(__NAMESPACE__, 'dispatch', function ($e) {
$controller = $e->getTarget();
//$controller->layout()->setVariable('status', null);
$controller->layout('clinikalApi/layout/layout');

//global variable of language direction
$controller->layout()->setVariable('language_direction', $_SESSION['language_direction']);

}, 100);
}

}
1 change: 1 addition & 0 deletions modules/ClinikalAPI/acl/acl_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
AclExtended::addObjectAcl('client_app', 'Client Application', 'SearchPatient','Search Patient');
AclExtended::addObjectAcl('client_app', 'Client Application', 'Calendar','Calendar');
AclExtended::addObjectAcl('client_app', 'Client Application', 'AppointmentDetails','Appointment Details');
AclExtended::addObjectAcl('client_app', 'Client Application', 'ManageTemplates','Manage Templates');

AclExtended::addObjectSectionAcl('clinikal_api', 'Clinikal API');
AclExtended::addObjectAcl('clinikal_api', 'Clinikal API', 'general_settings','General settings');
Expand Down
3 changes: 3 additions & 0 deletions modules/ClinikalAPI/acl/acl_upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
AclExtended::addObjectSectionAcl('clinikal_api', 'Clinikal API');
AclExtended::addObjectAcl('clinikal_api', 'Clinikal API', 'general_settings','General settings');
AclExtended::addObjectAcl('clinikal_api', 'Clinikal API', 'lists','Lists');
},
'2.0.0' => function() {
AclExtended::addObjectAcl('client_app', 'Client Application', 'ManageTemplates','Manage Templates');
}
);
21 changes: 21 additions & 0 deletions modules/ClinikalAPI/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

use ClinikalAPI\Controller\ManagerApi;
use ClinikalAPI\Controller\FormTemplatesManagementController;
use Interop\Container\ContainerInterface;

return array(
Expand All @@ -29,6 +30,9 @@
ManagerApi::class => function (ContainerInterface $container) {
return new ManagerApi($container);
},
FormTemplatesManagementController::class => function (ContainerInterface $container) {
return new FormTemplatesManagementController($container);
},
],

),
Expand All @@ -53,6 +57,19 @@
),
),
),
'templetes_management' => array(
'type' => 'segment',
'options' => array(
'route' => '/templates-management[/:action]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'controller' => FormTemplatesManagementController::class,
'action' => 'templatesManagementIndex',
),
),
),
),
),

Expand All @@ -61,5 +78,9 @@
'template_path_stack' => array(
'ClinikalAPI' => __DIR__ . '/../view',
),
'template_map' => array(
'clinikalApi/layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
)
),

);
128 changes: 128 additions & 0 deletions modules/ClinikalAPI/sql/1_0_0-to-2_0_0_upgrade.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
--
-- Comment Meta Language Constructs:
--
-- #IfNotTable
-- argument: table_name
-- behavior: if the table_name does not exist, the block will be executed

-- #IfTable
-- argument: table_name
-- behavior: if the table_name does exist, the block will be executed

-- #IfColumn
-- arguments: table_name colname
-- behavior: if the table and column exist, the block will be executed

-- #IfMissingColumn
-- arguments: table_name colname
-- behavior: if the table exists but the column does not, the block will be executed

-- #IfNotColumnType
-- arguments: table_name colname value
-- behavior: If the table table_name does not have a column colname with a data type equal to value, then the block will be executed

-- #IfNotRow
-- arguments: table_name colname value
-- behavior: If the table table_name does not have a row where colname = value, the block will be executed.

-- #IfNotRow2D
-- arguments: table_name colname value colname2 value2
-- behavior: If the table table_name does not have a row where colname = value AND colname2 = value2, the block will be executed.

-- #IfNotRow3D
-- arguments: table_name colname value colname2 value2 colname3 value3
-- behavior: If the table table_name does not have a row where colname = value AND colname2 = value2 AND colname3 = value3, the block will be executed.

-- #IfNotRow4D
-- arguments: table_name colname value colname2 value2 colname3 value3 colname4 value4
-- behavior: If the table table_name does not have a row where colname = value AND colname2 = value2 AND colname3 = value3 AND colname4 = value4, the block will be executed.

-- #IfNotRow2Dx2
-- desc: This is a very specialized function to allow adding items to the list_options table to avoid both redundant option_id and title in each element.
-- arguments: table_name colname value colname2 value2 colname3 value3
-- behavior: The block will be executed if both statements below are true:
-- 1) The table table_name does not have a row where colname = value AND colname2 = value2.
-- 2) The table table_name does not have a row where colname = value AND colname3 = value3.

-- #IfRow2D
-- arguments: table_name colname value colname2 value2
-- behavior: If the table table_name does have a row where colname = value AND colname2 = value2, the block will be executed.

-- #IfRow3D
-- arguments: table_name colname value colname2 value2 colname3 value3
-- behavior: If the table table_name does have a row where colname = value AND colname2 = value2 AND colname3 = value3, the block will be executed.

-- #IfIndex
-- desc: This function is most often used for dropping of indexes/keys.
-- arguments: table_name colname
-- behavior: If the table and index exist the relevant statements are executed, otherwise not.

-- #IfNotIndex
-- desc: This function will allow adding of indexes/keys.
-- arguments: table_name colname
-- behavior: If the index does not exist, it will be created

-- #EndIf
-- all blocks are terminated with a #EndIf statement.

-- #IfNotListReaction
-- Custom function for creating Reaction List

-- #IfNotListOccupation
-- Custom function for creating Occupation List

-- #IfTextNullFixNeeded
-- desc: convert all text fields without default null to have default null.
-- arguments: none

-- #IfTableEngine
-- desc: Execute SQL if the table has been created with given engine specified.
-- arguments: table_name engine
-- behavior: Use when engine conversion requires more than one ALTER TABLE

-- #IfInnoDBMigrationNeeded
-- desc: find all MyISAM tables and convert them to InnoDB.
-- arguments: none
-- behavior: can take a long time.

-- #IfTranslationNeeded
-- desc: find all MyISAM tables and convert them to InnoDB.
-- arguments: constant_name english hebrew
-- behavior: can take a long time.

#IfMissingColumn clinikal_templates_map active
ALTER TABLE `clinikal_templates_map` ADD `active` tinyint(1) NOT NULL DEFAULT 1;
#EndIf

#IfMissingColumn clinikal_templates_map update_by
ALTER TABLE `clinikal_templates_map` ADD `update_by` int(11) NOT NULL;
#EndIf

#IfMissingColumn clinikal_templates_map update_date
ALTER TABLE `clinikal_templates_map` ADD `update_date` datetime NOT NULL DEFAULT current_timestamp;
#EndIf


#IfNotRow2D questionnaires_schemas form_name commitment_questionnaire qid 9
INSERT INTO `questionnaires_schemas` (`qid`, `form_name`,`form_table`, `column_type`, `question`)
VALUES
('9', 'commitment_questionnaire','form_commitment_questionnaire', 'string', 'Exemption reason'),
('10', 'commitment_questionnaire','form_commitment_questionnaire', 'string', 'Comment');
#EndIf

#IfNotRow2D list_options list_id lists option_id clinikal_no_payment_reason
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES
('lists', 'clinikal_no_payment_reason', 'Reasons for encounter without payment', 0, 1),
('clinikal_no_payment_reason', 'personal', 'Personal', 20, 1),
('clinikal_no_payment_reason', 'followup_encounter', 'Follow up encounter', 30, 1);
#EndIf

#IfNotRow fhir_value_sets id no_payment_reasons
INSERT INTO `fhir_value_sets` (`id`, `title`)
VALUES ('no_payment_reasons', 'Reasons for encounter without payment');
#EndIf

#IfNotRow2D fhir_value_set_systems vs_id no_payment_reasons system clinikal_no_payment_reason
INSERT INTO `fhir_value_set_systems` (`vs_id`, `system`, `type`,`filter`)
VALUES ('no_payment_reasons', 'clinikal_no_payment_reason', 'All', NULL);
#EndIf
26 changes: 25 additions & 1 deletion modules/ClinikalAPI/sql/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ CREATE TABLE `clinikal_templates_map` (
ALTER TABLE `clinikal_templates_map`
ADD PRIMARY KEY (`form_id`,`form_field`,`service_type`,`reason_code`,`message_id`);

ALTER TABLE `clinikal_templates_map` ADD `active` tinyint(1) NOT NULL DEFAULT 1;
ALTER TABLE `clinikal_templates_map` ADD `update_by` int(11) NOT NULL;
ALTER TABLE `clinikal_templates_map` ADD `update_date` datetime NOT NULL DEFAULT current_timestamp;




CREATE TABLE `form_context_map` (
`form_id` INT NOT NULL,
Expand Down Expand Up @@ -131,7 +137,9 @@ VALUES
('5', 'commitment_questionnaire','form_commitment_questionnaire', 'integer', 'doctor license number'),
('6', 'commitment_questionnaire','form_commitment_questionnaire', 'string', 'Payment amount'),
('7', 'commitment_questionnaire','form_commitment_questionnaire', 'string', 'Payment method'),
('8', 'commitment_questionnaire','form_commitment_questionnaire', 'string', 'Receipt number');
('8', 'commitment_questionnaire','form_commitment_questionnaire', 'string', 'Receipt number'),
('9', 'commitment_questionnaire','form_commitment_questionnaire', 'string', 'Exemption reason'),
('10', 'commitment_questionnaire','form_commitment_questionnaire', 'string', 'Comment');


INSERT INTO `fhir_value_sets` (`id`, `title`)
Expand All @@ -150,3 +158,19 @@ CREATE TABLE manage_templates_letters(
`letter_post_json` mediumtext DEFAULT NULL,
PRIMARY KEY (`id`)
);



INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`, `activity`, `subtype`, `edit_options`) VALUES
('lists', 'clinikal_form_fields_templates', 'Form fields that use templates', 0, 0, 0, '', '', '', 0, 0, 1, '', 1);

INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES
('lists', 'clinikal_no_payment_reason', 'Reasons for encounter without payment', 0, 1),
('clinikal_no_payment_reason', 'personal', 'Personal', 20, 1),
('clinikal_no_payment_reason', 'followup_encounter', 'Follow up encounter', 30, 1);

INSERT INTO `fhir_value_sets` (`id`, `title`)
VALUES ('no_payment_reasons', 'Reasons for encounter without payment');

INSERT INTO `fhir_value_set_systems` (`vs_id`, `system`, `type`,`filter`)
VALUES ('no_payment_reasons', 'clinikal_no_payment_reason', 'All', NULL);
Loading