Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Local Variables  | All
Print Page as PDF
Routine: PSOSPMKY

Package: Outpatient Pharmacy

Routine: PSOSPMKY


Information

PSOSPMKY ;BIRM/MFR - State Prescription Monitoring Program - SSH Key Management ;01/06/16

Source Information

Source file <PSOSPMKY.m>

Call Graph

Call Graph

Call Graph Total: 13

Package Total Call Graph
Kernel 8 ($$FTG,CLOSE,DEL,OPEN)^%ZISH  USE^%ZISUTL  $$OS^%ZOSV  ^%ZTLOAD  ($$FMTHL7,$$HTFM,$$NOW)^XLFDT  $$LOW^XLFSTR  SIG^XUSESIG  ($$DECRYP,$$ENCRYP)^XUSRB1  
VA FileMan 4 ^DIC  (,UPDATE)^DIE  $$GET1^DIQ  ^DIR  
Outpatient Pharmacy 1 ($$DIREXIST,MAKEDIR,PAUSE)^PSOSPMU1  

Caller Graph

Legends:

Legend of Colors

Package Component Superscript legend

action A extended action Ea event driver Ed subscriber Su protocol O limited protocol LP run routine RR broker B edit E server Se print P screenman SM inquire I

Caller Graph

Caller Graph Total: 2

Package Total Caller Graph
Kernel 1 ^DIC(19  
Outpatient Pharmacy 1 PSO SPMP SSH KEY MANAGEMENT  

Entry Points

Name Comments DBIA/ICR reference
EN ; Entry-point
ACTION ; SSH Key Action
END
NEWKEY(STATEIEN,ENCRTYPE) ; Generate and store a pair of SSH keys for a specific state
; Input: (r) STATEIEN - State that will be using the new key pair. Pointer to the STATE file (#5)
; (o) ENCRTYPE - SSH Encryption Type (DSA / RSA) (Default: RSA)
RETRIEVE(STATEIEN,KEYTYPE) ; Retrieve the SSH Key into the ^TMP global
; Input: (r) STATEIEN - State to retrieve the SSH Key from
; (o) KEYTYPE - SSH Key Type (PUB - Public / PRV - PRivate) (Default: Public)
VIEW(STATEIEN) ; Displays the SSH Public Key
DELETE(STATEIEN) ; Delete Both SSH Keys associated with the State
OPENSSH() ; Returns the SSH Public Key in OpenSSH Format (Converts if necessary)
BKENDOS() ; Returns the Backend Server Operating System (OS)
SETOS(JOB) ; Sets the Operating Systems in ^XTMP("PSOSPMKY",$J,"OS") (Called via Taskman)
HELP ; SSH Key Help Text
ETHELP ; Encryption Type Help

External References

Name Field # of Occurrence
$$FTG^%ZISH NEWKEY+36, NEWKEY+39
CLOSE^%ZISH NEWKEY+24
DEL^%ZISH NEWKEY+43
OPEN^%ZISH NEWKEY+20
USE^%ZISUTL NEWKEY+21
$$OS^%ZOSV NEWKEY+6, BKENDOS+9, SETOS+2
^%ZTLOAD ACTION+38, BKENDOS+6
^DIC EN+4
^DIE NEWKEY+62, DELETE+3
UPDATE^DIE NEWKEY+57
$$GET1^DIQ ACTION+9, ACTION+19, ACTION+21, ACTION+30, ACTION+53, ACTION+55, NEWKEY+7, RETRIEVE+7, RETRIEVE+13, VIEW+7
^DIR ACTION+4, ACTION+25, ACTION+31, ACTION+56
$$DIREXIST^PSOSPMU1 NEWKEY+30
MAKEDIR^PSOSPMU1 NEWKEY+30
PAUSE^PSOSPMU1 ACTION+9, ACTION+14, ACTION+22, ACTION+46, HELP+13
$$FMTHL7^XLFDT NEWKEY+11
$$HTFM^XLFDT NEWKEY+11
$$NOW^XLFDT ACTION+38, BKENDOS+6
$$LOW^XLFSTR NEWKEY+23, NEWKEY+31
SIG^XUSESIG ACTION+10
$$DECRYP^XUSRB1 RETRIEVE+11
$$ENCRYP^XUSRB1 NEWKEY+54, NEWKEY+55

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !
  • Line Location: EN+2
Function Call: WRITE
  • Prompt: !!,"The PSO SPMP ADMIN security key is required for this action.",$C(7)
  • Line Location: ACTION+6
Function Call: WRITE
  • Prompt: !!,"[No SSH Key Pair found for ",$$GET1^DIQ(5,STATEIEN,.01),"]",$C(7)
  • Line Location: ACTION+9
Function Call: WRITE
  • Prompt: !
  • Line Location: ACTION+14
Function Call: WRITE
  • Prompt: !!,"The ",$S(PSOOS["VMS":"OPEN VMS",1:"UNIX/LINUX")," LOCAL DIRECTORY parameter is missing for ",$$GET1^DIQ(5,STATEIEN,.01),". Please,"
  • Line Location: ACTION+21
Function Call: WRITE
  • Prompt: !,"update it in the View/Edit SPMP State Parameters option and try again.",$C(7)
  • Line Location: ACTION+22
Function Call: WRITE
  • Prompt: !!,$G(IOBON),"WARNING:",$G(IOBOFF)," 'DSA' SSH keys are being phased out and are no longer supported.",$C(7)
  • Line Location: ACTION+27
Function Call: WRITE
  • Prompt: !!,$G(IOBON),"WARNING:",$G(IOBOFF)," You may be overwriting SSH Keys that are currently in use.",$C(7)
  • Line Location: ACTION+29
Function Call: WRITE
  • Prompt: !!,"Creating New SSH Keys, please wait..."
  • Line Location: ACTION+34
Function Call: WRITE
  • Prompt: !!,"There was a problem with the generation of the new SSH Key Pair."
  • Line Location: ACTION+45
Function Call: WRITE
  • Prompt: !,"Please try again and if the problem persists contact IT Support.",$C(7)
  • Line Location: ACTION+46
Function Call: WRITE
  • Prompt: "Done",$C(7)
  • Line Location: ACTION+47
Function Call: WRITE
  • Prompt: !!,"[No SSH Key Pair found for ",$$GET1^DIQ(5,STATEIEN,.01),"]",$C(7)
  • Line Location: ACTION+53
Function Call: WRITE
  • Prompt: !!,$G(IOBON),"WARNING:",$G(IOBOFF)," You may be deleting SSH Keys that are currently in use.",$C(7)
  • Line Location: ACTION+54
Function Call: WRITE
  • Prompt: !!,"Deleting SSH Keys..."
  • Line Location: ACTION+57
Function Call: WRITE
  • Prompt: "Done",$C(7)
  • Line Location: ACTION+57
Function Call: WRITE
  • Prompt: "SSH_KEYGEN == ""$SYS$SYSTEM:TCPIP$SSH_SSH-KEYGEN2.EXE""",!
  • Line Location: NEWKEY+22
Function Call: WRITE
  • Prompt: "SSH_KEYGEN -t "_$$LOW^XLFSTR($G(ENCRTYPE))_" -""P"" "_LOCALDIR_KEYFILE,!
  • Line Location: NEWKEY+23
Function Call: WRITE
  • Prompt: !,$$GET1^DIQ(5,STATEIEN,.01),"'s Public SSH Key (",$P($G(^TMP("PSOPUBKY",$J,0)),"^",2),") content (does not include dash lines):"
  • Line Location: VIEW+7
Function Call: WRITE
  • Prompt: !,DASHLN
  • Line Location: VIEW+8
Function Call: WRITE
  • Prompt: !,$E(SSHKEY,1,80)
  • Line Location: VIEW+9
Function Call: WRITE
  • Prompt: !,DASHLN
  • Line Location: VIEW+10
Function Call: WRITE
  • Prompt: !!,"Secure SHell (SSH) Encryption Keys are used to automate the data transmission"
  • Line Location: HELP+1
Function Call: WRITE
  • Prompt: !,"to the State Prescription Monitoring Programs (SPMPs). Follow the steps below"
  • Line Location: HELP+2
Function Call: WRITE
  • Prompt: !,"to successfully setup SPMP transmissions from VistA to the state/vendor server:"
  • Line Location: HELP+3
Function Call: WRITE
  • Prompt: !,""
  • Line Location: HELP+4
Function Call: WRITE
  • Prompt: !,"Step 1: Select the 'N' (Create New SSH Key Pair) Action and follow the prompts"
  • Line Location: HELP+5
Function Call: WRITE
  • Prompt: !," to create a new pair of SSH keys. If you already have an existing SSH"
  • Line Location: HELP+6
Function Call: WRITE
  • Prompt: !," Key Pair you can skip this step."
  • Line Location: HELP+7
Function Call: WRITE
  • Prompt: !," You can check whether you already have an existing SSH Key Pair"
  • Line Location: HELP+8
Function Call: WRITE
  • Prompt: !," through the 'V' (View Public SSH Key) Action."
  • Line Location: HELP+9
Function Call: WRITE
  • Prompt: !,""
  • Line Location: HELP+10
Function Call: WRITE
  • Prompt: !," Encryption Type: DSA or RSA?"
  • Line Location: HELP+11
Function Call: WRITE
  • Prompt: !," ----------------------------"
  • Line Location: HELP+12
Function Call: WRITE
  • Prompt: !!,"Step 2: Share the Public SSH Key content with the state/vendor. In order to"
  • Line Location: HELP+14
Function Call: WRITE
  • Prompt: !," successfully establish SPMP transmissions the state/vendor will have"
  • Line Location: HELP+15
Function Call: WRITE
  • Prompt: !," to install/configure the new SSH Key created in step 1 for the"
  • Line Location: HELP+16
Function Call: WRITE
  • Prompt: !," user id they assigned to your site. Use the 'V' (View Public SSH Key)"
  • Line Location: HELP+17
Function Call: WRITE
  • Prompt: !," Action to retrieve the content of the Public SSH key. The Public SSH"
  • Line Location: HELP+18
Function Call: WRITE
  • Prompt: !," Key should not contain line-feed characters, therefore after you copy"
  • Line Location: HELP+19
Function Call: WRITE
  • Prompt: !," & paste it from the terminal emulator into an email or text editor"
  • Line Location: HELP+20
Function Call: WRITE
  • Prompt: !," make sure it contains only one line of text (no wrapping)."
  • Line Location: HELP+21
Function Call: WRITE
  • Prompt: !," Digital Signature Algorithm (DSA) and Rivest, Shamir & Adleman (RSA)"
  • Line Location: ETHELP+1
Function Call: WRITE
  • Prompt: !," are two of the most common encryption algorithms used by the IT"
  • Line Location: ETHELP+2
Function Call: WRITE
  • Prompt: !," industry for securely sharing data. The majority of SPMP servers can"
  • Line Location: ETHELP+3
Function Call: WRITE
  • Prompt: !," handle either type; however there are vendors that accept only one"
  • Line Location: ETHELP+4
Function Call: WRITE
  • Prompt: !," specific type. You will need to contact the SPMP vendor support to"
  • Line Location: ETHELP+5
Function Call: WRITE
  • Prompt: !," determine which type to select."
  • Line Location: ETHELP+6
Routine Call
  • DIC
  • Line Location:
    • EN+4
Routine Call
  • DIE
  • Line Location:
    • NEWKEY+62
    • DELETE+3
Routine Call
  • DIE
  • Line Location:
    • NEWKEY+57
Routine Call
  • DIR
  • Line Location:
    • ACTION+4
    • ACTION+25
    • ACTION+31
    • ACTION+56

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^DIC(5 - [#5] GET1^DIQ
^PS(58.41 - [#58.41] Classic Fileman Calls,  GET1^DIQ

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^PS(58.41 - [#58.41] EN+3
^TMP( NEWKEY+48, NEWKEY+51, NEWKEY+52, NEWKEY+53, NEWKEY+54, NEWKEY+58!, RETRIEVE+9!, RETRIEVE+11*, RETRIEVE+12, RETRIEVE+13*
^TMP("PSOPRVKY" NEWKEY+34!, NEWKEY+36, NEWKEY+37, DELETE+4!
^TMP("PSOPUBKY" ACTION+7!, ACTION+8, ACTION+28, ACTION+33, ACTION+39!, ACTION+40, ACTION+42, ACTION+44, ACTION+52, NEWKEY+34!
, NEWKEY+39, NEWKEY+40, VIEW+7, DELETE+4!, OPENSSH+5, OPENSSH+6, OPENSSH+7, OPENSSH+8, OPENSSH+9, OPENSSH+12
, OPENSSH+13
^XTMP("PSOSPMKY" BKENDOS+3!, BKENDOS+7, BKENDOS+8!, SETOS+2*
^XUSEC("PSO SPMP ADMIN" ACTION+5

Label References

Name Line Occurrences
$$BKENDOS ACTION+18
$$OPENSSH VIEW+6
ACTION ACTION+5, ACTION+8, ACTION+10, ACTION+13, ACTION+17, ACTION+50, ACTION+60, ACTION+62
DELETE ACTION+33, ACTION+57, NEWKEY+14
EN EN+5
END EN+4, ACTION+4
ETHELP HELP+13
HELP ACTION+60
NEWKEY ACTION+43
RETRIEVE ACTION+7, ACTION+40, ACTION+43, ACTION+51
VIEW ACTION+14

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
BKENDOS BKENDOS+2~, BKENDOS+4*, BKENDOS+7*, BKENDOS+9
COMFILE NEWKEY+18~, NEWKEY+19*, NEWKEY+20, NEWKEY+25, NEWKEY+26
DA NEWKEY+3~, NEWKEY+61*, DELETE+2~, DELETE+3*
DASHLN VIEW+4~, VIEW+6*, VIEW+8, VIEW+10
DATETIME NEWKEY+3~, NEWKEY+11*, NEWKEY+19
DIC EN+1~, EN+2!*
DIC("A" EN+2*, EN+5!
DIC("B" EN+3*
DIC(0 EN+2*
DIE NEWKEY+3~, NEWKEY+61!*, DELETE+2~, DELETE+3*
DIR EN+1~, ACTION+1!, ACTION+23!, ACTION+30!, ACTION+55!
DIR("?" ACTION+23*
DIR("A" ACTION+1*, ACTION+23*, ACTION+30*, ACTION+55*
DIR("B" ACTION+4*, ACTION+25*, ACTION+30*, ACTION+55*
DIR(0 ACTION+2*, ACTION+3*, ACTION+24*, ACTION+30*, ACTION+55*
DIRUT EN+1~, ACTION+4, ACTION+25, ACTION+31, ACTION+56
DR NEWKEY+3~, NEWKEY+62*, DELETE+2~, DELETE+3*
DTOUT EN+1~, EN+4
DUOUT EN+1~, EN+4, ACTION+4, ACTION+25, ACTION+31, ACTION+56
DUZ ACTION+5
ENCRTYPE ACTION+26*, ACTION+36, ACTION+43, NEWKEY~, NEWKEY+8*, NEWKEY+23, NEWKEY+31, NEWKEY+62, OPENSSH+3~, OPENSSH+6*
, OPENSSH+10
FILE2DEL NEWKEY+3~
FILE2DEL( NEWKEY+26*, NEWKEY+32*
I ACTION+40*, BKENDOS+2~, BKENDOS+7*
>> IOBOFF ACTION+27, ACTION+29, ACTION+54
>> IOBON ACTION+27, ACTION+29, ACTION+54
JOB SETOS~, SETOS+2
KEYFILE NEWKEY+3~, NEWKEY+11*, NEWKEY+23, NEWKEY+26, NEWKEY+31, NEWKEY+32, NEWKEY+36, NEWKEY+39, NEWKEY+64
KEYTXT NEWKEY+3~, NEWKEY+47!, RETRIEVE+5~
KEYTXT( NEWKEY+54*, RETRIEVE+10, RETRIEVE+11
KEYTXT(1 NEWKEY+51*, NEWKEY+53*, NEWKEY+55*
KEYTYPE RETRIEVE~, RETRIEVE+6*, RETRIEVE+7, RETRIEVE+8
LINE NEWKEY+3~, NEWKEY+48*, NEWKEY+51, NEWKEY+52, NEWKEY+53, NEWKEY+54, RETRIEVE+5~, RETRIEVE+10*, RETRIEVE+11, OPENSSH+3~
, OPENSSH+7*, OPENSSH+8, OPENSSH+9, OPENSSH+12*, OPENSSH+13
LOCALDIR EN+1~, ACTION+19*, ACTION+20, NEWKEY+3~, NEWKEY+7*, NEWKEY+20, NEWKEY+23, NEWKEY+25, NEWKEY+30, NEWKEY+31
, NEWKEY+36, NEWKEY+39, NEWKEY+43
NMSPC NEWKEY+3~, NEWKEY+46*, NEWKEY+48, NEWKEY+50, NEWKEY+51, NEWKEY+52, NEWKEY+53, NEWKEY+54, NEWKEY+55, NEWKEY+56
, NEWKEY+58, RETRIEVE+5~, RETRIEVE+8*, RETRIEVE+9, RETRIEVE+11, RETRIEVE+12, RETRIEVE+13
OPENSSH OPENSSH+3~, OPENSSH+4*, OPENSSH+6*, OPENSSH+9*, OPENSSH+10*, OPENSSH+13*, OPENSSH+14
OVFLINE NEWKEY+3~, NEWKEY+52*, NEWKEY+53
PSOOS EN+1~, ACTION+18*, ACTION+19, ACTION+21, NEWKEY+3~, NEWKEY+6*, NEWKEY+7, NEWKEY+17, NEWKEY+29, NEWKEY+36
, NEWKEY+39, NEWKEY+50, NEWKEY+55, NEWKEY+62
PV NEWKEY+3~
SAVEKEY NEWKEY+3~, NEWKEY+47!
SAVEKEY( NEWKEY+56*
SSHKEY VIEW+4~, VIEW+6*, VIEW+9*
STATEIEN EN+1~, EN+5*, ACTION+7, ACTION+9, ACTION+14, ACTION+19, ACTION+21, ACTION+30, ACTION+33, ACTION+36
ACTION+40, ACTION+43, ACTION+51, ACTION+53, ACTION+55, ACTION+57, NEWKEY~, NEWKEY+5, NEWKEY+7, NEWKEY+14
, NEWKEY+56, NEWKEY+61, RETRIEVE~, RETRIEVE+7, RETRIEVE+13, VIEW~, VIEW+5, VIEW+7, DELETE~, DELETE+3
X EN+1~, EN+4, ACTION+10, NEWKEY+36*, NEWKEY+39*, RETRIEVE+5~, RETRIEVE+7*
X1 EN+1~, ACTION+10
Y EN+1~, EN+5, ACTION+5, ACTION+8, ACTION+10, ACTION+13, ACTION+17, ACTION+26, ACTION+31, ACTION+50
ACTION+56, ACTION+60
ZTDESC ACTION+35~, ACTION+37*, BKENDOS+2~, BKENDOS+5*
ZTDTH ACTION+35~, ACTION+38*, BKENDOS+2~, BKENDOS+6*
ZTIO ACTION+35~, ACTION+36*, BKENDOS+2~, BKENDOS+4*
ZTRTN ACTION+35~, ACTION+36*, BKENDOS+2~, BKENDOS+4*
ZTSK ACTION+35~, ACTION+38!, BKENDOS+2~
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Local Variables  | All