### Access CKEditor Sample Page for Installation Verification Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/ckeditor/README.md After installing CKEditor, this example URL demonstrates how to access the bundled sample page to verify the installation. Users need to replace with their domain and with the actual directory where CKEditor is deployed on their web server. ```text http:////samples/index.html For example: http://www.example.com/ckeditor/samples/index.html ``` -------------------------------- ### Verify CKEditor Installation via Sample Page URL Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/ckeditor/README.md Provides example URLs to access the CKEditor sample page, which can be used to verify a successful installation. Replace placeholders with your website's domain and the CKEditor installation path. ```HTTP http:////samples/index.html http://www.example.com/ckeditor/samples/index.html ``` -------------------------------- ### Verify CKEditor Installation with Sample Page Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/README.md After installation, access the samples/index.html page to verify that CKEditor is correctly set up. Replace with your domain and with the directory where CKEditor is installed. ```Plaintext http:////samples/index.html http://www.example.com/ckeditor/samples/index.html ``` -------------------------------- ### Install Morris.js Project Dependencies Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/morrisjs/README.md Run this command within the Morris.js project folder to install all necessary test and build dependencies using npm. ```Shell npm install ``` -------------------------------- ### Install Morris.js project dependencies Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/morrisjs/README.md After navigating into the Morris.js project directory, this command uses npm to install all required development dependencies, including testing and build tools, as specified in the project's package.json. ```npm npm install ``` -------------------------------- ### Install Grunt CLI Globally Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/morrisjs/README.md This command installs the Grunt command-line interface globally using npm, which is a prerequisite for building and testing Morris.js. ```Shell npm install -g grunt-cli ``` -------------------------------- ### Install Grunt Command Line Interface Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/tinymce/readme.md Installs the Grunt command line tool globally, which is required for running TinyMCE build tasks. ```Shell npm i -g grunt-cli ``` -------------------------------- ### Install highlight.js in Node.js via npm Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/plugins/codesnippet/lib/highlight/CHANGES.md This snippet demonstrates the command-line instruction to install the highlight.js library using the Node Package Manager (npm), enabling its use in Node.js environments. ```Shell npm install highlight.js ``` -------------------------------- ### Install TinyMCE Project Dependencies Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/tinymce/readme.md Installs all necessary Node.js package dependencies for the TinyMCE project from its package.json file. ```Shell npm i ``` -------------------------------- ### Install TinyMCE Project Dependencies Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/tinymce/readme.md Installs all required Node.js package dependencies for the TinyMCE project, as specified in the project's package.json file. ```Shell npm i ``` -------------------------------- ### Install Grunt Command Line Interface Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/tinymce/readme.md Installs the Grunt CLI globally using npm, which is necessary to run Grunt commands from any directory in your terminal. ```Shell npm i -g grunt-cli ``` -------------------------------- ### Install CKEditor with Git Clone Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/ckeditor/README.md Clones a specific release branch of the CKEditor repository using Git. This method is suitable for direct installation of a chosen CKEditor version. ```Git git clone -b git://github.com/ckeditor/ckeditor-releases.git ``` -------------------------------- ### GNU Lesser General Public License (LGPL) Notice Template Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/tinymce/license.txt A template for the GNU Lesser General Public License (LGPL) notice to be included at the start of software source files. It outlines the license terms, explicitly disclaims warranty, and directs users to the full license text, emphasizing the free software nature and redistribution rights. ```Text Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ``` -------------------------------- ### Configure CKEditor Editor Settings Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/ckeditor/samples/index.html This JavaScript snippet demonstrates how to customize the CKEditor instance by modifying its configuration. It sets the editor language to Spanish, changes the UI color, defines the editor height, and enables toolbar collapsing. ```javascript CKEDITOR.editorConfig = function( config ) { config.language = 'es'; config.uiColor = '#F7B42C'; config.height = 300; config.toolbarCanCollapse = true; }; ``` -------------------------------- ### Compile, Minify, and Run Morris.js Tests Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/morrisjs/README.md After installing dependencies, use this command to compile the CoffeeScript files, minify the JavaScript, and execute the project's tests using Grunt. ```Shell grunt ``` -------------------------------- ### Install Grunt CLI globally for Morris.js development Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/morrisjs/README.md This command installs the Grunt command-line interface globally using npm. Grunt is a JavaScript task runner essential for compiling, minifying, and testing the Morris.js project. ```npm npm install -g grunt-cli ``` -------------------------------- ### GNU Lesser General Public License Copyright Notice Template Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/tinymce/license.txt A template for the copyright notice to be included at the start of source files, specifying the GNU Lesser General Public License (LGPL) terms, warranty disclaimers, and contact information for the Free Software Foundation. ```Text Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ``` -------------------------------- ### Sample Copyright Disclaimer for Software Libraries Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/tinymce/license.txt This snippet provides an example of a copyright disclaimer that an employer or school might sign to relinquish copyright interest in a library written by an employee or student. It includes placeholders for the organization, library name, author, and signatory details. ```plaintext Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice ``` -------------------------------- ### JavaScript Test Setup with Mocha and Chai Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/morrisjs/spec/specs.html Initializes Mocha for BDD style tests and configures Chai for assertions. It then conditionally runs the tests using mocha.run() only if the user agent is not PhantomJS, which is common for browser-based testing environments. ```JavaScript mocha.setup('bdd'); should = chai.should(); if (navigator.userAgent.indexOf('PhantomJS') < 0) { mocha.run(); } ``` -------------------------------- ### Compile, minify, and run tests for Morris.js Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/morrisjs/README.md Once all development dependencies are installed, this Grunt command executes the project's build tasks. It compiles CoffeeScript files, minifies the resulting JavaScript, and runs the associated test suite. ```Grunt grunt ``` -------------------------------- ### Setting Up Mocha and Chai for JavaScript Tests Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/morrisjs/spec/specs.html This code snippet initializes Mocha for Behavior-Driven Development (BDD) style testing and configures Chai for assertion syntax. It also includes a conditional check to run tests only if the environment is not PhantomJS, which is a common practice for browser-based test runners. ```JavaScript mocha.setup('bdd'); should = chai.should(); if (navigator.userAgent.indexOf('PhantomJS') < 0) { mocha.run(); } ``` -------------------------------- ### Clone CKEditor Releases Repository via Git Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/ckeditor/README.md This command clones a specific release branch of the CKEditor repository from GitHub. It's used for direct installation of a chosen CKEditor version. The placeholder must be replaced with the desired version, such as 4.3.x or stable. ```bash git clone -b git://github.com/ckeditor/ckeditor-releases.git ``` -------------------------------- ### Highlight.js Language Mode Configuration Example Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/plugins/codesnippet/lib/highlight/CHANGES.md This snippet demonstrates the updated syntax for defining language submodes directly within the 'contains' array in highlight.js configurations. This approach simplifies the definition of auxiliary parsing modes that are only needed in one place and often do not generate separate HTML spans. ```JavaScript Configuration contains: [ 'string', 'number', {begin: '\n', end: hljs.IMMEDIATE_RE} ] ``` -------------------------------- ### JavaScript: Setup Inter-Frame Data Communication Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/ckeditor/plugins/wsc/dialogs/ciframe.html This set of functions establishes communication between an iframe and its parent/master frame. It includes sending data at intervals, listening for incoming messages via `postMessage`, and initializing these processes on page load. It relies on a `XDTMaster` object in the parent frame for data exchange. ```JavaScript var interval; function sendData2Master() { var destination = window.parent.parent ; try { if ( destination.XDTMaster ) { var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ; window.clearInterval( interval ) ; } } catch (e) {} } function OnMessage (event) { var message = event.data; var destination = window.parent.parent; destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ; } function listenPostMessage() { if (window.addEventListener) { // all browsers except IE before version 9 window.addEventListener ("message", OnMessage, false); }else { if (window.attachEvent) { // IE before version 9 window.attachEvent("onmessage", OnMessage); } } } function onLoad() { interval = window.setInterval( sendData2Master, 100 ); listenPostMessage(); } ``` -------------------------------- ### Toggle CKEditor Toolbar Modes (Basic/Advanced) Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/ckeditor/samples/toolbarconfigurator/index.html Manages the display of CKEditor toolbars by switching between 'basic' and 'advanced' modes. It updates UI elements, sets window hash, and refreshes the toolbar based on the selected mode. It uses `toogleModeSwitch` for visual updates and `onRefresh` for re-rendering. The initial setup also watches the toolbar for sticky behavior in advanced mode. ```JavaScript if ( mode === 2 ) { onToolbarsDone(); positionSticky.watch( CKEDITOR.document.findOne( '.toolbar' ), function() { return mode === 'advanced'; } ); } function onToolbarsDone() { if ( mode === 'basic' ) { toggleModeBasic( false ); } else { toggleModeAdvanced( false ); } updateSwitcher(); setTimeout( function() { CKEDITOR.document.findOne( '.editors-container' ).addClass( 'active' ); CKEDITOR.document.findOne( '#toolbarModifierWrapper' ).addClass( 'active' ); }, 200 ); } CKEDITOR.document.getById( 'toolbarModifierWrapper' ).append( toolbarTextModifier.mainContainer ); function toogleModeSwitch( onElement, offElement, onModifier, offModifier ) { onElement.addClass( 'fancy-button-active' ); offElement.removeClass( 'fancy-button-active' ); onModifier.showUI(); offModifier.hideUI(); } function toggleModeBasic( callOnRefresh ) { callOnRefresh = ( callOnRefresh !== false ); mode = 'basic'; window.location.hash = '#basic'; toogleModeSwitch( modeSwitchBasic, modeSwitchAdvanced, toolbarModifier, toolbarTextModifier ); configuratorSection.removeClass( 'freed-width' ); basicInstruction.show(); advancedInstruction.hide(); callOnRefresh && onRefresh( toolbarModifier ); } function toggleModeAdvanced( callOnRefresh ) { callOnRefresh = ( callOnRefresh !== false ); mode = 'advanced'; window.location.hash = '#advanced'; toogleModeSwitch( modeSwitchAdvanced, modeSwitchBasic, toolbarTextModifier, toolbarModifier ); configuratorSection.addClass( 'freed-width' ); advancedInstruction.show(); basicInstruction.hide(); callOnRefresh && onRefresh( toolbarTextModifier ); } modeSwitchBasic.on( 'click', toggleModeBasic ); modeSwitchAdvanced.on( 'click', toggleModeAdvanced ); ``` -------------------------------- ### Building TinyMCE from Source Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/tinymce/readme.md Instructions for setting up the development environment and building the TinyMCE editor from its source code, including Node.js and npm dependencies. ```Shell npm i -g grunt-cli ``` ```Shell npm i ``` ```Shell grunt ``` -------------------------------- ### Sample Copyright Disclaimer for Software Library Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/tinymce/license.txt A sample legal text for an employer or school to disclaim copyright interest in a software library developed by an employee or student, including placeholders for names and dates. ```Text Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice ``` -------------------------------- ### Display Grunt Build Tasks Help Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/tinymce/readme.md Shows a list of all available Grunt build tasks along with their descriptions, providing helpful guidance on command usage. ```Shell grunt --help ``` -------------------------------- ### API: Unified global options with configure(options) Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/ckeditor/plugins/codesnippet/lib/highlight/CHANGES.md The `configure(options)` method now serves as the central point for setting global highlight.js options, unifying parameters like `tabReplace` and `useBR`. This change consolidates configuration settings that were previously scattered across different functions like `highlightBlock` and `fixMarkup`. ```APIDOC configure(options: object) options: An object containing global configuration parameters. classPrefix: string (e.g., '', 'hljs-') tabReplace: string (e.g., ' ') useBR: boolean (e.g., true, false) ``` -------------------------------- ### Build TinyMCE Release Packages Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/tinymce/readme.md Runs linting, minification, unit tests, and creates release packages for TinyMCE, preparing it for distribution. ```Shell grunt ``` -------------------------------- ### Patient Terminal Assessment Data Schema and Example Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/DataPenilaianPasienTerminal.html Defines the data fields and their types for recording patient terminal assessments in the SIMRS KHANZA system, followed by an example data record. This schema outlines the structure of the assessment records, including patient details, medical status, and end-of-life indicators. ```APIDOC PatientTerminalAssessment: No.Rawat: string (Patient Treatment Number) No.R.M.: string (Patient Medical Record Number) Nama Pasien: string (Patient Name) Tgl.Lahir: date (Date of Birth) JK: string (Gender) Tanggal: datetime (Assessment Date and Time) Diagnosa: string (Diagnosis Code) Uraian Penyakit/Kondisi Pasien Saat Ini: string (Current Disease/Condition Description) Riwayat Penyakit/Kondisi Sebelumnya: string (Previous Disease/Condition History) Keadaan Umum: string (General Condition) Kesadaran: string (Consciousness Level) TD(mmHg): string (Blood Pressure in mmHg) Nadi(x/menit): string (Pulse Rate per minute) Suhu(°C): string (Temperature in Celsius) RR(x/menit): string (Respiration Rate per minute) SpO2(%): string (Oxygen Saturation Percentage) Skala Nyeri: string (Pain Scale) Tahap Menjelang Ajal: string (Stage Approaching Death) Tanda-tanda Klinis Menjelang Kematian: string (Clinical Signs Approaching Death) Kebutuhan Spiritual Pasien/Keluarga: string (Patient/Family Spiritual Needs) NIP: string (Employee ID of Assessor) Petugas: string (Name of Assessor) Example Record: No.Rawat: "2023/01/27/000002" No.R.M.: "000003" Nama Pasien: "HAFIZ HARIYADI" Tgl.Lahir: "1997-05-22" JK: "L" Tanggal: "2023-03-07 07:48:54.0" Diagnosa: "8" Uraian Penyakit/Kondisi Pasien Saat Ini: "1" Riwayat Penyakit/Kondisi Sebelumnya: "2" Keadaan Umum: "Sangat Jelek" Kesadaran: "Compos Mentis" TD(mmHg): "3" Nadi(x/menit): "4" Suhu(°C): "5" RR(x/menit): "7" SpO2(%): "6" Skala Nyeri: "0" Tahap Menjelang Ajal: "Menerima" Tanda-tanda Klinis Menjelang Kematian: "Pernapasan Tidak Teratur & Dangkal/Ngorok" Kebutuhan Spiritual Pasien/Keluarga: "9" NIP: "123124" Petugas: "FREDIAN AHMAD" ``` -------------------------------- ### Sample Copyright Disclaimer for Software Library Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/tinymce/license.txt A sample copyright disclaimer for an employer or school to sign, relinquishing their copyright interest in a software library developed by an employee or student. This ensures the library can be freely licensed without employer claims. ```Text Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice ``` -------------------------------- ### Display TinyMCE Grunt Build Tasks Help Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/tinymce/readme.md Shows a list of available Grunt build tasks and their descriptions for TinyMCE, providing quick reference for developers. ```Shell grunt --help ``` -------------------------------- ### CKEDITOR.dialog.setState() Method Introduction Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/ckeditor/CHANGES.md Introduced the `setState()` method for CKEditor dialogs. This method is used to programmatically change the state of a dialog, for example, to indicate that a resource is currently being loaded within the Embed dialog. ```APIDOC CKEDITOR.dialog.setState( state: string ) ``` -------------------------------- ### CKEditor Editor Get Selected HTML Method Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/CHANGES.md Retrieves the HTML content of the current selection in the CKEditor instance. This UX-focused method simplifies obtaining the selected content. ```APIDOC editor.getSelectedHtml(): string ``` -------------------------------- ### Set Body Background Color with CSS Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/morrisjs/examples/donut-colors.html A simple CSS rule to set the background color of the HTML body element to a light grey. This is a basic styling example for web pages. ```CSS body { background:#ccc; } ``` -------------------------------- ### Pass Widget Startup Data as Command Argument Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/CHANGES.md Added support for passing widget's startup data as an argument to a widget command. This enhances flexibility when initializing widgets via commands. ```APIDOC CKEDITOR.plugins.widget: API Description: Supports passing startup data as a widget command's argument. ``` -------------------------------- ### Bundle TinyMCE Core, Themes, and Plugins Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/tinymce/readme.md Minifies the TinyMCE core and then bundles specified themes (e.g., 'modern') and plugins (e.g., 'table', 'paste') into a single 'tinymce.min.js' file for optimized deployment. ```Shell grunt bundle --themes modern --plugins table,paste ``` -------------------------------- ### GNU LGPL Copyright Notice Template for Source Files Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/tinymce/license.txt This template provides the standard structure for a copyright notice to be included at the beginning of each source file for a library distributed under the GNU Lesser General Public License (LGPL). It specifies the copyright holder, the license version, and the explicit exclusion of warranty. ```plaintext Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ``` -------------------------------- ### CKEditor Dialog Method: setState() Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/CHANGES.md The `dialog#setState()` method was added to `CKEDITOR.dialog`. This method is used to update the state of a dialog, for example, in the Embed dialog to indicate that a resource is currently being loaded, providing visual feedback to the user. ```APIDOC CKEDITOR.dialog.setState( state: string ) ``` -------------------------------- ### JavaScript: Get URL Parameter from URL Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/plugins/wsc/dialogs/ciframe.html This utility function extracts the value of a specified query parameter from the current window's URL. It handles special characters in the parameter name and returns an empty string if the parameter is not found. ```javascript function gup( name ) { name = name.replace( /\[\\\[\]/, '\\\\\\\[` ).replace( /\[\\\]\]/, '\\\\\\\]` ) ; var regexS = '\\[\\\\?&\\]' + name + '=(\[^&#\]\\*)' ; var regex = new RegExp( regexS ) ; var results = regex.exec( window.location.href ) ; if ( results ) return results\[ 1 \] ; else return '' ; } ``` -------------------------------- ### JavaScript: Get URL Parameter Value Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/ckeditor/plugins/wsc/dialogs/ciframe.html This function extracts the value of a specified URL query parameter from the current window's location. It handles special characters in the parameter name by escaping them. Returns an empty string if the parameter is not found. ```JavaScript function gup( name ) { name = name.replace( /[\\[]/, "\\\\\[" ).replace( /[\\]]/, "\\\\\]" ) ; var regexS = '[\\\\?&]' + name + '=(\[^&#\]\*)' ; var regex = new RegExp( regexS ) ; var results = regex.exec( window.location.href ) ; if ( results ) return results\[ 1 \] ; else return '' ; } ``` -------------------------------- ### Manage Help Button and Pico Modal Display Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/ckeditor/samples/toolbarconfigurator/index.html Handles the display and functionality of a help button, which, when clicked, opens a modal window containing help content. It includes a check to hide the button for unsupported browsers like IE8 and uses `SF.modal` for modal creation. ```JavaScript ( function() { var helpButton = CKEDITOR.document.getById( 'help' ), helpContent = CKEDITOR.document.getById( 'help-content' ); if ( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) { helpButton.hide(); } else { helpButton.on( 'click', function( evt ) { SF.modal( { content: helpContent.getHtml(), afterCreate: function( modal ) { // Enable modal content button to cl ``` -------------------------------- ### JavaScript: CKEditor Toolbar Mode Toggling Functions Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/samples/toolbarconfigurator/index.html Functions to manage the display modes of CKEditor toolbars (basic and advanced). `onToolbarsDone` finalizes setup, `toogleModeSwitch` handles UI element visibility, and `toggleModeBasic`/`toggleModeAdvanced` switch between modes, updating the UI and hash. ```javascript function onToolbarsDone() { if ( mode === 'basic' ) { toggleModeBasic( false ); } else { toggleModeAdvanced( false ); } updateSwitcher(); setTimeout( function() { CKEDITOR.document.findOne( '.editors-container' ).addClass( 'active' ); CKEDITOR.document.findOne( '#toolbarModifierWrapper' ).addClass( 'active' ); }, 200 ); } CKEDITOR.document.getById( 'toolbarModifierWrapper' ).append( toolbarTextModifier.mainContainer ); function toogleModeSwitch( onElement, offElement, onModifier, offModifier ) { onElement.addClass( 'fancy-button-active' ); offElement.removeClass( 'fancy-button-active' ); onModifier.showUI(); offModifier.hideUI(); } function toggleModeBasic( callOnRefresh ) { callOnRefresh = ( callOnRefresh !== false ); mode = 'basic'; window.location.hash = '#basic'; toogleModeSwitch( modeSwitchBasic, modeSwitchAdvanced, toolbarModifier, toolbarTextModifier ); configuratorSection.removeClass( 'freed-width' ); basicInstruction.show(); advancedInstruction.hide(); callOnRefresh && onRefresh( toolbarModifier ); } function toggleModeAdvanced( callOnRefresh ) { callOnRefresh = ( callOnRefresh !== false ); mode = 'advanced'; window.location.hash = '#advanced'; toogleModeSwitch( modeSwitchAdvanced, modeSwitchBasic, toolbarTextModifier, toolbarModifier ); configuratorSection.addClass( 'freed-width' ); advancedInstruction.show(); basicInstruction.hide(); callOnRefresh && onRefresh( toolbarTextModifier ); } modeSwitchBasic.on( 'click', toggleModeBasic ); modeSwitchAdvanced.on( 'click', toggleModeAdvanced ); ``` -------------------------------- ### Get Selected HTML Content from CKEditor Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/CHANGES.md Documentation for the `editor.getSelectedHtml()` method, which retrieves the HTML of the currently selected content within the CKEditor instance. Note that in version 4.5.3, this method returned invalid results when the entire content was selected. ```APIDOC CKEDITOR.editor.getSelectedHtml(): string Purpose: Returns the HTML of the currently selected content. Note: In CKEditor 4.5.3, this method returned invalid results for entire content selection. ``` -------------------------------- ### Bundle TinyMCE Themes and Plugins Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/tinymce/readme.md Minifies the core TinyMCE library and bundles specified themes (e.g., 'modern') and plugins (e.g., 'table', 'paste') into a single `tinymce.min.js` file for optimized loading. ```Shell grunt bundle --themes modern --plugins table,paste ``` -------------------------------- ### highlight.js API: configure(options) Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/plugins/codesnippet/lib/highlight/CHANGES.md Configures global options for highlight.js. This method unifies previously separate parameters like `tabReplace` and `useBR` into a single options object. It also affects `highlightBlock` and `fixMarkup` which now rely on these global settings. ```APIDOC hljs.configure(options: object) options: An object containing configuration settings. classPrefix: string (default: 'hljs-') - Prefix for CSS classes. tabReplace: string (default: null) - String to replace tabs with. useBR: boolean (default: false) - Whether to use
for newlines. languages: string[] (default: null) - An array of language names to restrict auto-detection to. ``` -------------------------------- ### Build TinyMCE Project (Default Task) Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/tinymce/readme.md Executes the default Grunt task, which performs linting, minification, runs unit tests, and creates release packages for TinyMCE. ```Shell grunt ``` -------------------------------- ### Support widget startup data in command arguments Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/ckeditor/CHANGES.md Adds support for passing widget's startup data as an argument to a widget command, enhancing widget initialization and command execution flexibility. ```APIDOC CKEDITOR.plugins.widget: feature: Widget commands now support passing startup data as an argument for initialization. ``` -------------------------------- ### Pass Widget Startup Data as Command Argument Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/ckeditor/CHANGES.md Added support for passing widget's startup data as an argument to a widget command, enhancing flexibility during widget initialization and command execution. ```APIDOC CKEDITOR.plugins.widget: usage: Passing startup data to commands: description: Widget startup data can now be passed as an argument to widget commands. example: command.exec(editor, { startupData: { /* ... */ } }); ``` -------------------------------- ### Data Structure: Initial Medical Assessment (Physical Medicine) Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/PenilaianAwalMedisKedokteranFisik.html Defines the fields and their inferred types for recording initial medical assessment data in the SIMRS KHANZA system. Each field represents a specific aspect of the patient's condition, history, and treatment plan, with example values provided. ```APIDOC DataPenilaianAwalMedisKedokteranFisik: No.Rawat: string (e.g., "2023/08/21/000001") No.RM: string (e.g., "000022") Nama Pasien: string (e.g., "RUDI SANTOSO") Tgl.Lahir: date (e.g., "1957-03-11") J.K.: string (e.g., "Perempuan") NIP: string (e.g., "D0000004") Nama Dokter: string (e.g., "dr. Hilyatul Nadia") Tanggal: datetime (e.g., "2023-08-22 20:30:13.0") Anamnesis: string (e.g., "Autoanamnesis") Hubungan: integer (e.g., 1) Keluhan Utama: integer (e.g., 2) Riwayat Penyakit Sekarang: integer (e.g., 3) Riwayat Penyakit Dahulu: integer (e.g., 5) Riwayat Alergi: integer (e.g., 4) Kesadaran: string (e.g., "Compos Mentis") Nyeri: string (e.g., "Nyeri Sangat Hebat") Skala Nyeri: integer (e.g., 10) TD(mmHg): integer (e.g., 8) Nadi(x/menit): integer (e.g., 6) Suhu(°C): integer (e.g., 9) RR(x/menit): integer (e.g., 10) BB(Kg): integer (e.g., 7) Kepala: string (e.g., "Tidak Diperiksa") Keterangan Kepala: integer (e.g., 11) Thoraks: string (e.g., "Tidak Diperiksa") Keterangan Thoraks: integer (e.g., 12) Abdomen: string (e.g., "Tidak Diperiksa") Keterangan Abdomen: integer (e.g., 13) Ekstremitas: string (e.g., "Tidak Diperiksa") Keterangan Ekstremitas: integer (e.g., 14) Columna Vertebralis: string (e.g., "Tidak Diperiksa") Keterangan Columna: integer (e.g., 15) Muskuloskeletal: string (e.g., "Normal") Keterangan Muskuloskeletal: integer (e.g., 16) Lainnya: integer (e.g., 17) Resiko Jatuh: string (e.g., "Berisiko Sedang") Resiko Nutrisional: string (e.g., "Tidak Berisiko Malnutrisi") Kebutuhan Fungsional: string (e.g., "Tidak Perlu Bantuan") Diagnosa Medis: integer (e.g., 18) Diagnosa Fungsi: integer (e.g., 19) Pemeriksaan Penunjang: integer (e.g., 20) Fisioterapi: integer (e.g., 21) Okupasi: integer (e.g., 22) Wicara: integer (e.g., 23) Akupuntur: integer (e.g., 24) Tatalaksana Lainnya: integer (e.g., 25) Frekuensi Terapi: date (e.g., "2023-08-22") Terapi Fisio: date (e.g., "2023-08-22") Terapi Okupasi: string (e.g., "27 sasasas") Terapi Wicara: string (no example data) Terapi Akupuntur: string (no example data) Terapi Lainnya: string (no example data) ``` -------------------------------- ### SIMRS KHANZA Outpatient Oral Surgery Initial Medical Assessment Data Schema Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/DataPenilaianAwalMedisRalanBedahMulut.html Defines the data structure for initial medical assessments of outpatient oral surgery patients in the SIMRS KHANZA system. It includes field names, inferred data types, brief descriptions, and an example record to illustrate the data format. ```APIDOC Data Structure: Initial Medical Assessment (Outpatient Oral Surgery) Fields: - No.Rawat (string): Rawat Number. Example: "2023/05/26/000001" - No.RM (string): Medical Record Number. Example: "000013" - Nama Pasien (string): Patient Name. Example: "PARAMITA RAMADANI" - Tgl.Lahir (date): Date of Birth. Example: "1990-01-01" - J.K. (string): Gender (J.K. = Jenis Kelamin). Example: "Laki-Laki" (Male) - Kode Dokter (string): Doctor Code. Example: "D0000003" - Nama Dokter (string): Doctor Name. Example: "dr. Qotrunnada" - Tanggal (datetime): Assessment Date and Time. Example: "2023-05-28 21:28:40.0" - Anamnesis (string): Anamnesis Type. Example: "Autoanamnesis" - Hubungan (string): Relationship. Example: "1" - Keluhan Utama (string): Chief Complaint. Example: "2" - Riwayat Penyakit Sekarang (string): History of Present Illness. Example: "3" - Riwayat Penyakit Keluarga (string): Family Medical History. Example: "4" - Alergi (string): Allergies. Example: "5" - Keadaan Umum (string): General Condition. Example: "Sedang" (Moderate) - Kesadaran (string): Consciousness Level. Example: "Compos Mentis" - Skala Nyeri (string): Pain Scale. Example: "Nyeri Tak Tertahankan" (Intolerable Pain) - Tensi(mmHg) (string): Blood Pressure (mmHg). Example: "6" - Nadi(x/menit) (string): Pulse Rate (x/minute). Example: "7" - Suhu(°C) (string): Temperature (°C). Example: "8" - RR(x/menit) (string): Respiration Rate (x/minute). Example: "9" - BB(Kg) (string): Body Weight (Kg). Example: "10" - TB(Cm) (string): Body Height (Cm). Example: "11" - Status Nutrisi (string): Nutritional Status. Example: "12" - Kulit (string): Skin Examination. Example: "Tidak" (No) - Keterangan Kulit (string): Skin Description. Example: "13" - Kepala (string): Head Examination. Example: "Tidak" (No) - Keterangan Kepala (string): Head Description. Example: "14" - Mata (string): Eye Examination. Example: "Tidak" (No) - Keterangan Mata (string): Eye Description. Example: "15" - Leher (string): Neck Examination. Example: "Tidak" (No) - Keterangan Leher (string): Neck Description. Example: "16" - Kelenjar (string): Gland Examination. Example: "Tidak" (No) - Keterangan Kelenjar (string): Gland Description. Example: "17" - Dada (string): Chest Examination. Example: "Tidak" (No) - Keterangan Dada (string): Chest Description. Example: "18" - Perut (string): Abdomen Examination. Example: "Tidak" (No) - Keterangan Perut (string): Abdomen Description. Example: "19" - Ekstremitas (string): Extremities Examination. Example: "Tidak" (No) - Keterangan Ekstremitas (string): Extremities Description. Example: "20" - Wajah (string): Face Examination. Example: "21" - Intra (string): Intraoral Examination. Example: "22" - Gigi Geligi (string): Teeth Examination. Example: "23" - Laborat (string): Laboratory Results. Example: "24" - Radiologi (string): Radiology Results. Example: "25" - Penunjang (string): Supporting Examinations. Example: "26" - Asesmen Kerja (string): Working Assessment. Example: "27" - Asesmen Banding (string): Differential Assessment. Example: "28" - Permasalahan (string): Problems. Example: "29" - Terapi (string): Therapy. Example: "30" - Tindakan (string): Actions. Example: "31" - Edukasi (string): Education. Example: "32" Example Data Record: No.Rawat: "2023/05/26/000001" No.RM: "000013" Nama Pasien: "PARAMITA RAMADANI" Tgl.Lahir: "1990-01-01" J.K.: "Laki-Laki" Kode Dokter: "D0000003" Nama Dokter: "dr. Qotrunnada" Tanggal: "2023-05-28 21:28:40.0" Anamnesis: "Autoanamnesis" Hubungan: "1" Keluhan Utama: "2" Riwayat Penyakit Sekarang: "3" Riwayat Penyakit Keluarga: "4" Alergi: "5" Keadaan Umum: "Sedang" Kesadaran: "Compos Mentis" Skala Nyeri: "Nyeri Tak Tertahankan" Tensi(mmHg): "6" Nadi(x/menit): "7" Suhu(°C): "8" RR(x/menit): "9" BB(Kg): "10" TB(Cm): "11" Status Nutrisi: "12" Kulit: "Tidak" Keterangan Kulit: "13" Kepala: "Tidak" Keterangan Kepala: "14" Mata: "Tidak" Keterangan Mata: "15" Leher: "Tidak" Keterangan Leher: "16" Kelenjar: "Tidak" Keterangan Kelenjar: "17" Dada: "Tidak" Keterangan Dada: "18" Perut: "Tidak" Keterangan Perut: "19" Ekstremitas: "Tidak" Keterangan Ekstremitas: "20" Wajah: "21" Intra: "22" Gigi Geligi: "23" Laborat: "24" Radiologi: "25" Penunjang: "26" Asesmen Kerja: "27" Asesmen Banding: "28" Permasalahan: "29" Terapi: "30" Tindakan: "31" Edukasi: "32" ``` -------------------------------- ### TinyMCE Grunt Help Task Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/epasien/plugins/tinymce/readme.md Displays a list of all available Grunt build tasks for the TinyMCE project. ```Shell grunt --help ``` -------------------------------- ### highlight.js API: highlight and highlightAuto Relevance Score Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/ckeditor/plugins/codesnippet/lib/highlight/CHANGES.md The return structure for `highlight` and `highlightAuto` methods has been simplified. The `relevance` and `keyword_count` attributes are now unified into a single `relevance` score. ```APIDOC highlight(name: string, value: string, ignore_illegals: boolean, continuation: object): Returns: object relevance: number - Unified relevance score (combines previous relevance and keyword_count). value: string - Highlighted HTML string. language: string - Detected language. highlightAuto(value: string, languageSubset: string[]): value: The code string to highlight. languageSubset: An optional array of language names to restrict detection to for this specific call. Returns: object relevance: number - Unified relevance score. value: string - Highlighted HTML string. language: string - Detected language. ``` -------------------------------- ### Initialize Morris.js Donut Chart with Click Handler Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/morrisjs/examples/donut.html This JavaScript code demonstrates how to create a Donut Chart using Morris.js. It defines the chart's element, data points with values and labels, a custom formatter to display percentages, and an event listener for clicks on chart segments. ```JavaScript Morris.Donut({ element: 'graph', data: [ {value: 70, label: 'foo'}, {value: 15, label: 'bar'}, {value: 10, label: 'baz'}, {value: 5, label: 'A really really long label'} ], formatter: function (x) { return x + "%"} }).on('click', function(i, row){ console.log(i, row); }); ``` -------------------------------- ### Create Morris.js Bar Chart with Click Event Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/edokter/plugins/morrisjs/examples/bar.html This JavaScript snippet initializes a bar chart using the Morris.js library. It configures the chart's target element, provides sample data, defines the x-axis key, and specifies multiple y-axis keys and their corresponding labels. An optional click event handler is included to log clicked data points to the console. ```JavaScript // Use Morris.Bar Morris.Bar({ element: 'graph', data: [ {x: '2011 Q1', y: 3, z: 2, a: 3}, {x: '2011 Q2', y: 2, z: null, a: 1}, {x: '2011 Q3', y: 0, z: 2, a: 4}, {x: '2011 Q4', y: 2, z: 4, a: 3} ], xkey: 'x', ykeys: ['y', 'z', 'a'], labels: ['Y', 'Z', 'A'] }).on('click', function(i, row){ console.log(i, row); }); ``` -------------------------------- ### Create a Bar Chart using Morris.js Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/morrisjs/examples/bar.html This snippet demonstrates how to generate a bar chart using the Morris.js library. It initializes a chart on an HTML element with ID 'graph', providing sample data with 'x' as the x-axis key and 'y', 'z', 'a' as y-axis keys. It also includes a click event handler to log the clicked data point. ```JavaScript Morris.Bar({ element: 'graph', data: [ {x: '2011 Q1', y: 3, z: 2, a: 3}, {x: '2011 Q2', y: 2, z: null, a: 1}, {x: '2011 Q3', y: 0, z: 2, a: 4}, {x: '2011 Q4', y: 2, z: 4, a: 3} ], xkey: 'x', ykeys: ['y', 'z', 'a'], labels: ['Y', 'Z', 'A'] }).on('click', function(i, row){ console.log(i, row); }); ``` -------------------------------- ### Configure a Morris.js Donut Chart Source: https://github.com/mas-elkhanza/simrs-khanza/blob/master/emcu/plugins/morrisjs/examples/donut-colors.html This snippet demonstrates how to initialize a Morris.js Donut Chart. It specifies the target element, data points with values and labels, background and label colors, a custom color palette for segments, and a formatter function for displaying percentage values. ```JavaScript Morris.Donut({ element: 'graph', data: [ {value: 70, label: 'foo'}, {value: 15, label: 'bar'}, {value: 10, label: 'baz'}, {value: 5, label: 'A really really long label'} ], backgroundColor: '#ccc', labelColor: '#060', colors: [ '#0BA462', '#39B580', '#67C69D', '#95D7BB' ], formatter: function (x) { return x + "%"} }); ```