http://localhost:8080/ or https://localhost8443/
This blog provides some ready-made tips, tricks, tweaks & interview questions-answers on C, C++, Perl, Shell Scripting and UNIX Commands.
Monday, June 28, 2021
Thursday, May 6, 2021
Name Interface Engines in HL7
Orion Health - Rhapsody Integration Engine
NextGen Connect - Mirth Connect
iNTERFACEWARE - Iguana
Lawson Worldwide - Lawson Cloverleaf
Corepoint Health - Corepoint Integration Engine
Intersystems - Ensemble
Thursday, March 25, 2021
What is modality in HIS-RIS?
Modality is the term used in radiology to refer the therapeutic method in which images are generated/recorded. More generally, in clinical medicine, the term modality is used for different types of procedures and therapies. Modality for radiology orders in ORM^O01 message. we are currently using the OBR-24 field as Modality for radiology orders message.
Thursday, October 11, 2018
What are the minimum segments necessary to generate an ADT message?
MSH - Message header (Required)
EVN - Event type (Required)
PID - Patient identification (Required)
PV1 - Patient visit (Required)
EVN - Event type (Required)
PID - Patient identification (Required)
PV1 - Patient visit (Required)
What are the minimum segments necessary to generate an ORU message?
MSH - Message header (Required)
PID - Patient identification (Required)
PV1 - Patient visit (Required)
OBR - Observation request (Required)
OBX - Observation segment (Required, Repeatable)
PID - Patient identification (Required)
PV1 - Patient visit (Required)
OBR - Observation request (Required)
OBX - Observation segment (Required, Repeatable)
What are the minimum segments necessary to generate an MDM message?
MSH - Message header (Required)
EVN - Event type (Required)
PID - Patient identification (Required)
PV1 - Patient visit (Required)
TXA - Document notification segment (Required)
OBX - Observation segment (Required, Repeatable)
EVN - Event type (Required)
PID - Patient identification (Required)
PV1 - Patient visit (Required)
TXA - Document notification segment (Required)
OBX - Observation segment (Required, Repeatable)
Thursday, August 9, 2018
Get inactive RDP connections logged off
@echo off
color 0a
title Logging off Disconnected RDP(s) . . . . .
cls
::Disconnected user logoff
for /f "tokens=2 delims= " %%a in ('query user ^| findstr Disc') do for %%b in (%%a) do (echo %~n0 script is logging off session id - %%a logoff %%a)
::Active user logoff
for /f "tokens=3 delims= " %%a in ('query user ^| findstr Active') do for %%b in (%%a) do (echo %~f0 is logging off session id - %%a logoff %%a)
title Logging off RDP(s) Complete . . . . .
exit
*Note - You must have administrator privileges.
color 0a
title Logging off Disconnected RDP(s) . . . . .
cls
::Disconnected user logoff
for /f "tokens=2 delims= " %%a in ('query user ^| findstr Disc') do for %%b in (%%a) do (echo %~n0 script is logging off session id - %%a logoff %%a)
::Active user logoff
for /f "tokens=3 delims= " %%a in ('query user ^| findstr Active') do for %%b in (%%a) do (echo %~f0 is logging off session id - %%a logoff %%a)
title Logging off RDP(s) Complete . . . . .
exit
*Note - You must have administrator privileges.
Tuesday, June 6, 2017
C program that prints itself.
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
FILE *fp;
if ((fp = fopen(__FILE__, "r")) == NULL)
{
printf("Error! opening file %s\n", __FILE__);
exit(1);
}
while(!feof(fp))
{
printf("%c", fgetc(fp));
}
fclose(fp);
getch();
return 0;
}
#include <conio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
FILE *fp;
if ((fp = fopen(__FILE__, "r")) == NULL)
{
printf("Error! opening file %s\n", __FILE__);
exit(1);
}
while(!feof(fp))
{
printf("%c", fgetc(fp));
}
fclose(fp);
getch();
return 0;
}
Sunday, June 4, 2017
Mitrh & Intersystems CacheDB Connecivity Setup
1. Copy CacheDB.jar into C:\Program Files\Mirth Connect\server-lib\database in your Mirth v3.5 installation directory.
2. Update the dbdrivers.xml file ($MIRTH_HOME/conf/dbdrivers.xml) by appending a line defining the driver class (Driver Class = com.intersys.jdbc.CacheDriver) and JDBC URL( jdbc:Cache://<host>:<port>/<namespace>)
<drivers>
<driver class="sun.jdbc.odbc.JdbcOdbcDriver" name="Sun JDBC-ODBC Bridge" template="jdbc:odbc:DSN" selectLimit="" />
<driver class="com.mysql.jdbc.Driver" name="MySQL" template="jdbc:mysql://host:port/dbname" selectLimit="SELECT * FROM ? LIMIT 1" />
<driver class="oracle.jdbc.driver.OracleDriver" name="Oracle" template="jdbc:oracle:thin:@host:port:dbname" selectLimit="SELECT * FROM ? WHERE ROWNUM < 2" />
<driver class="org.postgresql.Driver" name="PostgreSQL" template="jdbc:postgresql://host:port/dbname" selectLimit="SELECT * FROM ? LIMIT 1" />
<driver class="net.sourceforge.jtds.jdbc.Driver" name="SQL Server/Sybase" template="jdbc:jtds:sqlserver://host:port/dbname" selectLimit="SELECT TOP 1 * FROM ?" />
<driver class="org.sqlite.JDBC" name="SQLite" template="jdbc:sqlite:dbfile.db" selectLimit="SELECT * FROM ? LIMIT 1" />
<driver class="com.intersys.jdbc.CacheDriver" name="CacheDB" template="jdbc:Cache://host:port/namespace" selectLimit="SELECT * FROM ? LIMIT 1" />
</drivers>
3. Restart mirth connecct.
Note: CacheDB.jar can be downloaded at following sites
http://www.dbschema.com/cache-jdbc-driver.html
https://www.oxygenxml.com/database_drivers.html
2. Update the dbdrivers.xml file ($MIRTH_HOME/conf/dbdrivers.xml) by appending a line defining the driver class (Driver Class = com.intersys.jdbc.CacheDriver) and JDBC URL( jdbc:Cache://<host>:<port>/<namespace>)
<drivers>
<driver class="sun.jdbc.odbc.JdbcOdbcDriver" name="Sun JDBC-ODBC Bridge" template="jdbc:odbc:DSN" selectLimit="" />
<driver class="com.mysql.jdbc.Driver" name="MySQL" template="jdbc:mysql://host:port/dbname" selectLimit="SELECT * FROM ? LIMIT 1" />
<driver class="oracle.jdbc.driver.OracleDriver" name="Oracle" template="jdbc:oracle:thin:@host:port:dbname" selectLimit="SELECT * FROM ? WHERE ROWNUM < 2" />
<driver class="org.postgresql.Driver" name="PostgreSQL" template="jdbc:postgresql://host:port/dbname" selectLimit="SELECT * FROM ? LIMIT 1" />
<driver class="net.sourceforge.jtds.jdbc.Driver" name="SQL Server/Sybase" template="jdbc:jtds:sqlserver://host:port/dbname" selectLimit="SELECT TOP 1 * FROM ?" />
<driver class="org.sqlite.JDBC" name="SQLite" template="jdbc:sqlite:dbfile.db" selectLimit="SELECT * FROM ? LIMIT 1" />
<driver class="com.intersys.jdbc.CacheDriver" name="CacheDB" template="jdbc:Cache://host:port/namespace" selectLimit="SELECT * FROM ? LIMIT 1" />
</drivers>
3. Restart mirth connecct.
Note: CacheDB.jar can be downloaded at following sites
http://www.dbschema.com/cache-jdbc-driver.html
https://www.oxygenxml.com/database_drivers.html
Wednesday, May 31, 2017
What are the differences between a v2.x and v3 message in HL7?
The key differences between a v2.x and v3 message are as follows:
v2.x was primarily meant for clinical communications - medical orders, patient registration etc. whereas v3.x has additional features for use by informaticists and for government reporting requirements.
v2.x was a custom format (barebones text - all coded and separated by a pipe with headers and multiple segments etc.) whereas an HL7 v3.0 message is an XML format - very verbose and detailed.
v2.x was primarily meant for clinical communications - medical orders, patient registration etc. whereas v3.x has additional features for use by informaticists and for government reporting requirements.
v2.x was a custom format (barebones text - all coded and separated by a pipe with headers and multiple segments etc.) whereas an HL7 v3.0 message is an XML format - very verbose and detailed.
What is the difference between 'global' and 'static global' in C?
All static variables, no matter where they are allocated, as well as all global variables, are subjected to "static initialization". They must be initialized by the program before it starts. If you haven't initialized them explicitly, they are implicitly initialized to zero (or NULL for pointers).
Tuesday, May 30, 2017
How do you delete temporary files and folders?
@ECHO OFF
COLOR 0A
DEL /A /F /Q /S "%temp%\*.*"
FOR /D %%p IN ("%temp%\*.*") DO RD "%%p" /S /Q
DEL /A /F /Q /S "C:\Windows\Temp\*.*"
FOR /D %%p IN ("C:\Windows\Temp\*.*") DO RD "%%p" /S /Q
DEL /A /F /Q /S "C:\Windows\Prefetch\*.*"
FOR /D %%p IN ("C:\Windows\Prefetch\*.*") DO RD "%%p" /S /Q
FOR /D %%p IN ("C:\Windows\SoftwareDistribution\Download\*.*") DO RD "%%p" /S /Q
Tuesday, November 15, 2016
How do you get milliseconds for timestamp in Perl?
use Time::Moment;
print "\n[ @{[Time::Moment->now->strftime('%Y-%m-%d %H:%M:%S.%6N')]} ]";
print "\n[ @{[Time::Moment->now->strftime('%Y-%m-%d %H:%M:%S.%6N')]} ]";
print "@{[Time::Moment->now->strftime('%Y%m%d%H%M%S%6N')]}\n";
#or
my $time = Time::Moment->new;
print $time->now->strftime('%Y%m%d%H%M%S%6N');
Friday, October 21, 2016
How do you access FTP directories on web browser?
If you are using IE or a web browser, then it'd be
Monday, June 27, 2016
How do you create a jar file on Windows CLI?
1. Start Command Prompt.
2. Navigate to the folder that holds your class files:
C:\>cd \mywork
3. Set path to include JDK’s bin. For example:
C:\mywork> path c:\Program Files\Java\jdk1.7.0_25\bin;%path%
4. Compile your class(es):
C:\mywork> javac *.java
5. Create a manifest file and your jar file:
C:\mywork> echo Main-Class: Craps >manifest.txt
C:\mywork> jar cvfm Craps.jar manifest.txt *.class
or
C:\mywork> jar cvfe Craps.jar Craps *.class
6. Test your jar:
C:\mywork> Craps.jar
or
C:\mywork> java -jar Craps.jar
2. Navigate to the folder that holds your class files:
C:\>cd \mywork
3. Set path to include JDK’s bin. For example:
C:\mywork> path c:\Program Files\Java\jdk1.7.0_25\bin;%path%
4. Compile your class(es):
C:\mywork> javac *.java
5. Create a manifest file and your jar file:
C:\mywork> echo Main-Class: Craps >manifest.txt
C:\mywork> jar cvfm Craps.jar manifest.txt *.class
or
C:\mywork> jar cvfe Craps.jar Craps *.class
6. Test your jar:
C:\mywork> Craps.jar
or
C:\mywork> java -jar Craps.jar
Wednesday, June 8, 2016
How do you find out files with size more than 1GB in command prompt?
:: 1 GB = 1073741824 KB
forfiles /P E:\Movies\Hollywood\ /M *.* /S /C "cmd /c if @fsize gtr 1073741824 echo @path @fsize @fdate @ftime"
forfiles /P E:\Movies\Hollywood\ /M *.* /S /C "cmd /c if @fsize gtr 1073741824 echo @path @fsize @fdate @ftime"
Wednesday, May 4, 2016
How do you pad a string?
use warnings;
use strict;
use 5.010;
my $FName = 'Rabindra';
my $LName = 'Nayak';
my $strlen = length $FName;
if ($strlen < 10) {
$FName = $FName . ( ' ' x (10 - $strlen) );
}
print "$FName$LName\n";
#or
my $Name = sprintf "%-*s%s", $strlen, $FName, $LName;
print "$Name";
use strict;
use 5.010;
my $FName = 'Rabindra';
my $LName = 'Nayak';
my $strlen = length $FName;
if ($strlen < 10) {
$FName = $FName . ( ' ' x (10 - $strlen) );
}
print "$FName$LName\n";
#or
my $Name = sprintf "%-*s%s", $strlen, $FName, $LName;
print "$Name";
What are the additional delimiters & file extensions acceptable in delimited text file?
Comma (,) - .csv
Tabs (\t) - .tsv
Semi-colons (;)
Pipes (|) - .psv
Carets (^)
Tildes (~)
Tabs (\t) - .tsv
Semi-colons (;)
Pipes (|) - .psv
Carets (^)
Tildes (~)
Monday, November 2, 2015
How do you run Salesforce queries in Perl?
use WWW::Salesforce;
my $username = '<UserName>';
my $password = '<Password>';
my $security = '<Token>';
my $stoken = "$password$security";
# Authenticate with the Salesforce API
my $sforce = eval { WWW::Salesforce->login (
username => $username,
password => $stoken );
};
die "Could not login to Salesforce: $@" if $@;
my $query = "SELECT Id, Name, Email, AccountId FROM Contact";
my $res = $sforce->do_query( $query );
open(FH, '>:encoding(UTF-8)', "SF_Report.csv")
or die "Could not open file: \"SF_Report.csv\"";
foreach my $field (@$res) {
print FH "$field->{'Name'},$field->{'Email'},$field->{'AccountId'}\n";
}
my $username = '<UserName>';
my $password = '<Password>';
my $security = '<Token>';
my $stoken = "$password$security";
# Authenticate with the Salesforce API
my $sforce = eval { WWW::Salesforce->login (
username => $username,
password => $stoken );
};
die "Could not login to Salesforce: $@" if $@;
my $query = "SELECT Id, Name, Email, AccountId FROM Contact";
my $res = $sforce->do_query( $query );
open(FH, '>:encoding(UTF-8)', "SF_Report.csv")
or die "Could not open file: \"SF_Report.csv\"";
foreach my $field (@$res) {
print FH "$field->{'Name'},$field->{'Email'},$field->{'AccountId'}\n";
}
Monday, October 19, 2015
How do you run PostgreSQL query on Command Prompt?
@echo off
set REPORTNAME=%1
set timestamp=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%
set PGPASSWORD=<password>
"C:\Program Files (x86)\pgAdmin III\1.16\psql" -A -h %REPORTNAME% -U <UserName> -d <DatabaseName> -F , --pset footer -c "<Query>" -o "%REPORTNAME%_%timestamp%.csv"
set REPORTNAME=%1
set timestamp=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%
set PGPASSWORD=<password>
"C:\Program Files (x86)\pgAdmin III\1.16\psql" -A -h %REPORTNAME% -U <UserName> -d <DatabaseName> -F , --pset footer -c "<Query>" -o "%REPORTNAME%_%timestamp%.csv"
Subscribe to:
Posts
(
Atom
)