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,ENCRBITS) ; 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+38, NEWKEY+41
CLOSE^%ZISH NEWKEY+25
DEL^%ZISH NEWKEY+45
OPEN^%ZISH NEWKEY+21
USE^%ZISUTL NEWKEY+22
$$OS^%ZOSV NEWKEY+6, BKENDOS+9, SETOS+2
^%ZTLOAD BKENDOS+6
^DIC EN+4
^DIE NEWKEY+64, DELETE+3
UPDATE^DIE NEWKEY+59
$$GET1^DIQ ACTION+9, ACTION+19, ACTION+21, ACTION+36, ACTION+61, ACTION+63, NEWKEY+7, RETRIEVE+7, RETRIEVE+13, VIEW+7
^DIR ACTION+4, ACTION+25, ACTION+32, ACTION+37, ACTION+64
$$DIREXIST^PSOSPMU1 NEWKEY+31
MAKEDIR^PSOSPMU1 NEWKEY+31
PAUSE^PSOSPMU1 ACTION+9, ACTION+14, ACTION+22, ACTION+53, HELP+14
$$FMTHL7^XLFDT NEWKEY+12
$$HTFM^XLFDT NEWKEY+12
$$NOW^XLFDT BKENDOS+6
$$LOW^XLFSTR NEWKEY+24, NEWKEY+33
SIG^XUSESIG ACTION+10
$$DECRYP^XUSRB1 RETRIEVE+11
$$ENCRYP^XUSRB1 NEWKEY+56, NEWKEY+57

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+35
Function Call: WRITE
  • Prompt: !!,"Creating New SSH Keys, please wait..."
  • Line Location: ACTION+40
Function Call: WRITE
  • Prompt: !!,"There was a problem with the generation of the new SSH Key Pair."
  • Line Location: ACTION+52
Function Call: WRITE
  • Prompt: !,"Please try again and if the problem persists contact IT Support.",$C(7)
  • Line Location: ACTION+53
Function Call: WRITE
  • Prompt: "Done",$C(7)
  • Line Location: ACTION+54
Function Call: WRITE
  • Prompt: !!,"[No SSH Key Pair found for ",$$GET1^DIQ(5,STATEIEN,.01),"]",$C(7)
  • Line Location: ACTION+61
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+62
Function Call: WRITE
  • Prompt: !!,"Deleting SSH Keys..."
  • Line Location: ACTION+65
Function Call: WRITE
  • Prompt: "Done",$C(7)
  • Line Location: ACTION+65
Function Call: WRITE
  • Prompt: "SSH_KEYGEN == ""$SYS$SYSTEM:TCPIP$SSH_SSH-KEYGEN2.EXE""",!
  • Line Location: NEWKEY+23
Function Call: WRITE
  • Prompt: "SSH_KEYGEN -t "_$$LOW^XLFSTR($G(ENCRTYPE))_" -""P"" "_LOCALDIR_KEYFILE,!
  • Line Location: NEWKEY+24
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. You can check whether you already"
  • Line Location: HELP+7
Function Call: WRITE
  • Prompt: !," have an existing SSH Key Pair through the 'V' (View Public SSH Key)"
  • Line Location: HELP+8
Function Call: WRITE
  • Prompt: !," Action."
  • Line Location: HELP+9
Function Call: WRITE
  • Prompt: !,""
  • Line Location: HELP+10
Function Call: WRITE
  • Prompt: !," Encryption Type: DSA, RSA, ECDSA or EDDSA?"
  • Line Location: HELP+12
Function Call: WRITE
  • Prompt: !," -----------------------------------"
  • Line Location: HELP+13
Function Call: WRITE
  • Prompt: !!,"Step 2: Share the Public SSH Key content with the state/vendor. In order to"
  • Line Location: HELP+15
Function Call: WRITE
  • Prompt: !," successfully establish SPMP transmissions the state/vendor will have"
  • Line Location: HELP+16
Function Call: WRITE
  • Prompt: !," to install/configure the new SSH Key created in step 1 for the"
  • Line Location: HELP+17
Function Call: WRITE
  • Prompt: !," user id they assigned to your site. Use the 'V' (View Public SSH Key)"
  • Line Location: HELP+18
Function Call: WRITE
  • Prompt: !," Action to retrieve the content of the Public SSH key. The Public SSH"
  • Line Location: HELP+19
Function Call: WRITE
  • Prompt: !," Key should not contain line-feed characters, therefore after you copy"
  • Line Location: HELP+20
Function Call: WRITE
  • Prompt: !," & paste it from the terminal emulator into an email or text editor"
  • Line Location: HELP+21
Function Call: WRITE
  • Prompt: !," make sure it contains only one line of text (no wrapping)."
  • Line Location: HELP+22
Function Call: WRITE
  • Prompt: !," Digital Signature Algorithm (DSA) (No longer supported) and Rivest,"
  • Line Location: ETHELP+1
Function Call: WRITE
  • Prompt: !," algorithms used by the IT industry for securely sharing data. "
  • Line Location: ETHELP+3
Function Call: WRITE
  • Prompt: !," Elliptic Curve Digital Signature Algorithm (ECDSA) and Edward-curve"
  • Line Location: ETHELP+5
Function Call: WRITE
  • Prompt: !," Digital Signature Algorithm (EDDSA) are more complex public key"
  • Line Location: ETHELP+6
Function Call: WRITE
  • Prompt: !," cryptography encryption algorithms that are now supported by the VA."
  • Line Location: ETHELP+7
Function Call: WRITE
  • Prompt: !," Many of SPMP servers can handle all types; however there are vendors"
  • Line Location: ETHELP+8
Function Call: WRITE
  • Prompt: !," that accept only one specific type. You will need to contact the SPMP"
  • Line Location: ETHELP+9
Function Call: WRITE
  • Prompt: !," vendor support to determine which type to select. If ECDSA is selected"
  • Line Location: ETHELP+10
Function Call: WRITE
  • Prompt: !," you will be prompted to enter the Bit size. Valid selections are 256,"
  • Line Location: ETHELP+11
Function Call: WRITE
  • Prompt: !," 384 or 521."
  • Line Location: ETHELP+12
Routine Call
  • DIC
  • Line Location:
    • EN+4
Routine Call
  • DIE
  • Line Location:
    • NEWKEY+64
    • DELETE+3
Routine Call
  • DIE
  • Line Location:
    • NEWKEY+59
Routine Call
  • DIR
  • Line Location:
    • ACTION+4
    • ACTION+25
    • ACTION+32
    • ACTION+37
    • ACTION+64

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+50, NEWKEY+53, NEWKEY+54, NEWKEY+55, NEWKEY+56, NEWKEY+60!, RETRIEVE+9!, RETRIEVE+11*, RETRIEVE+12, RETRIEVE+13*
^TMP("PSOPRVKY" NEWKEY+36!, NEWKEY+38, NEWKEY+39, DELETE+4!
^TMP("PSOPUBKY" ACTION+7!, ACTION+8, ACTION+34, ACTION+39, ACTION+51, ACTION+60, NEWKEY+36!, NEWKEY+41, NEWKEY+42, 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+58, ACTION+68, ACTION+70
DELETE ACTION+39, ACTION+65, NEWKEY+15
EN EN+5
END EN+4, ACTION+4
ETHELP HELP+14
HELP ACTION+68
NEWKEY ACTION+50
RETRIEVE ACTION+7, ACTION+50, ACTION+59
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+19~, NEWKEY+20*, NEWKEY+21, NEWKEY+26, NEWKEY+27
DA NEWKEY+3~, NEWKEY+63*, DELETE+2~, DELETE+3*
DASHLN VIEW+4~, VIEW+6*, VIEW+8, VIEW+10
DATETIME NEWKEY+3~, NEWKEY+12*, NEWKEY+20
DIC EN+1~, EN+2!*
DIC("A" EN+2*, EN+5!
DIC("B" EN+3*
DIC(0 EN+2*
DIE NEWKEY+3~, NEWKEY+63!*, DELETE+2~, DELETE+3*
DIR EN+1~, ACTION+1!, ACTION+23!, ACTION+30!, ACTION+36!, ACTION+63!
DIR("?" ACTION+23*, ACTION+30*
DIR("A" ACTION+1*, ACTION+23*, ACTION+30*, ACTION+36*, ACTION+63*
DIR("B" ACTION+4*, ACTION+25*, ACTION+32*, ACTION+36*, ACTION+63*
DIR(0 ACTION+2*, ACTION+3*, ACTION+24*, ACTION+31*, ACTION+36*, ACTION+63*
DIRUT EN+1~, ACTION+4, ACTION+25, ACTION+29, ACTION+37, ACTION+64
DR NEWKEY+3~, NEWKEY+64*, DELETE+2~, DELETE+3*
DTOUT EN+1~, EN+4
DUOUT EN+1~, EN+4, ACTION+4, ACTION+25, ACTION+29, ACTION+37, ACTION+64
DUZ ACTION+5
ENCRBITS ACTION+33*, ACTION+50, ACTION+55!, NEWKEY~, NEWKEY+32*, NEWKEY+33
ENCRTYPE ACTION+26*, ACTION+29, ACTION+33, ACTION+36, ACTION+50, NEWKEY~, NEWKEY+9*, NEWKEY+24, NEWKEY+33, NEWKEY+64
, OPENSSH+3~, OPENSSH+6*, OPENSSH+10
FILE2DEL NEWKEY+3~
FILE2DEL( NEWKEY+27*, NEWKEY+34*
I BKENDOS+2~, BKENDOS+7*
>> IOBOFF ACTION+27, ACTION+35, ACTION+62
>> IOBON ACTION+27, ACTION+35, ACTION+62
JOB SETOS~, SETOS+2
KEYFILE NEWKEY+3~, NEWKEY+12*, NEWKEY+24, NEWKEY+27, NEWKEY+33, NEWKEY+34, NEWKEY+38, NEWKEY+41, NEWKEY+66
KEYTXT NEWKEY+3~, NEWKEY+49!, RETRIEVE+5~
KEYTXT( NEWKEY+56*, RETRIEVE+10, RETRIEVE+11
KEYTXT(1 NEWKEY+53*, NEWKEY+55*, NEWKEY+57*
KEYTYPE RETRIEVE~, RETRIEVE+6*, RETRIEVE+7, RETRIEVE+8
LINE NEWKEY+3~, NEWKEY+50*, NEWKEY+53, NEWKEY+54, NEWKEY+55, NEWKEY+56, 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+21, NEWKEY+24, NEWKEY+26, NEWKEY+31, NEWKEY+33
, NEWKEY+38, NEWKEY+41, NEWKEY+45
NMSPC NEWKEY+3~, NEWKEY+48*, NEWKEY+50, NEWKEY+52, NEWKEY+53, NEWKEY+54, NEWKEY+55, NEWKEY+56, NEWKEY+57, NEWKEY+58
, NEWKEY+60, 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+54*, NEWKEY+55
PSOOS EN+1~, ACTION+18*, ACTION+19, ACTION+21, NEWKEY+3~, NEWKEY+6*, NEWKEY+7, NEWKEY+18, NEWKEY+30, NEWKEY+38
, NEWKEY+41, NEWKEY+52, NEWKEY+57, NEWKEY+64
PV NEWKEY+3~
SAVEKEY NEWKEY+3~, NEWKEY+49!
SAVEKEY( NEWKEY+58*
SSHKEY VIEW+4~, VIEW+6*, VIEW+9*
STATEIEN EN+1~, EN+5*, ACTION+7, ACTION+9, ACTION+14, ACTION+19, ACTION+21, ACTION+36, ACTION+39, ACTION+50
ACTION+59, ACTION+61, ACTION+63, ACTION+65, NEWKEY~, NEWKEY+5, NEWKEY+7, NEWKEY+15, NEWKEY+58, NEWKEY+63
, RETRIEVE~, RETRIEVE+7, RETRIEVE+13, VIEW~, VIEW+5, VIEW+7, DELETE~, DELETE+3
X EN+1~, EN+4, ACTION+10, NEWKEY+38*, NEWKEY+41*, 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+33, ACTION+37
ACTION+58, ACTION+64, ACTION+68
ZTDESC BKENDOS+2~, BKENDOS+5*
ZTDTH BKENDOS+2~, BKENDOS+6*
ZTIO BKENDOS+2~, BKENDOS+4*
ZTRTN BKENDOS+2~, BKENDOS+4*
ZTSK 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