Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: YS119PS1

YS119PS1.m

Go to the documentation of this file.
  1. YS119PS1 ;SLC/KCM - Patch 119 post-init - fixes ; 9/15/2015
  1. ;;5.01;MENTAL HEALTH;**119**;Dec 30, 1994;Build 40
  1. Q
  1. ;
  1. AUDIT ; fix scalegroup, scale, report
  1. N TSTIEN,IEN,CHGS
  1. S TSTIEN=$$FINDTEST^YS119PS0("AUDIT")
  1. ; update MH CHOICES: LEGACY VALUE (#4)
  1. S IEN=$$FINDCHC^YS119PS0(TSTIEN,2,2) ; 2nd question, 2nd choice
  1. S CHGS(4)=0
  1. D UPDANY^YS119PS0(601.75,IEN,.CHGS)
  1. ; update MH SCALEGROUPS: SCALEGROUP NAME (#2), ORDINATE TITLE (#4)
  1. S IEN=$$FINDSGRP^YS119PS0(TSTIEN,1)
  1. S CHGS(2)="AUDIT",CHGS(4)="T - Score"
  1. D UPDANY^YS119PS0(601.86,IEN,.CHGS)
  1. ; update MH SCALES: SCALE NAME (#3), XLABEL (#4)
  1. S IEN=$$FINDSCL^YS119PS0(IEN,1)
  1. S CHGS(3)="AUDIT",CHGS(4)="AUDIT"
  1. D UPDANY^YS119PS0(601.87,IEN,.CHGS)
  1. ; update MH REPORT: switch score to <-AUDIT->, remove "A score of..."
  1. S IEN=$$FINDRPT^YS119PS0(TSTIEN)
  1. D UPDRPT^YS119PS0(IEN,"AUDITRPT","YS119PS1")
  1. D UPDDT^YS119PS0(TSTIEN)
  1. Q
  1. AUDITRPT ;
  1. ;;.|.|Alcohol Use Disorders Identification Test||Date Given: <.Date_Given.>|Clinician: <.Staff_Ordered_By.>|Location: <.Location.>||Veteran: <.Patient_Name_Last_First.>|SSN: <.Patient_SSN.>|DOB:
  1. ;;<.Patient_Date_Of_Birth.> (<.Patient_Age.>)|Gender: <.Patient_Gender.>|| AUDIT Score: <-AUDIT->| |
  1. ;; Questions and Answers||1. How often do you have a drink containing alcohol? | <*Answer_89*>|2. How many drinks containing alcohol do you have on a typical day when you are drinking?
  1. ;;| <*Answer_90*>|3. How often do you have six or more drinks on one occasion? | <*Answer_91*>|4. How often during the last year have you found that you were not able to stop drinking once you
  1. ;;had started? | <*Answer_92*>|5. How often during the last year have you failed to do what was normally expected from you because of drinking? | <*Answer_93*>|6. How often during the last year
  1. ;;have you needed a first drink in the morning to get yourself going after a heavy drinking session? | <*Answer_94*>|7. How often during the last year have you had a feeling of guilt or remorse
  1. ;;after drinking? | <*Answer_95*>|8. How often during the last year have you been unable to remember what happened the night before because you had been drinking? | <*Answer_96*>|9. Have you or
  1. ;;someone else been injured as a result of your drinking? | <*Answer_97*>|10. Has a relative or friend, or a doctor or other health worker been concerned about your drinking or suggested that you
  1. ;;cut down? | <*Answer_98*>| ||Information contained in this note is based on a self report assessment and is not sufficient to use alone for diagnostic purposes. Assessment results should be
  1. ;;verified for accuracy and used in conjunction with other diagnostic activities.| $~
  1. ;;zzzzz
  1. ;
  1. BAI ; remove scale, Beck Anxiety Index, leaving Beck Anxiety Inventory
  1. N TSTIEN,SGIEN,IEN,DEL
  1. S TSTIEN=$$FINDTEST^YS119PS0("BAI")
  1. S SGIEN=$$FINDSGRP^YS119PS0(TSTIEN)
  1. S DEL=0
  1. S IEN=0 F S IEN=$O(^YTT(601.87,"AD",SGIEN,IEN)) Q:'IEN D Q:DEL
  1. . I $P(^YTT(601.87,IEN,0),U,4)="Beck Anxiety Index" S DEL=IEN
  1. Q:'DEL ; already deleted
  1. D DELANY^YS119PS0(601.87,DEL)
  1. D UPDDT^YS119PS0(TSTIEN)
  1. Q
  1. MMPI2RF ; fix reversed questions
  1. N TSTIEN,CTNTIEN,CHGS
  1. S TSTIEN=$$FINDTEST^YS119PS0("MMPI-2-RF")
  1. ; update MH INSTRUMENT CONTENT: QUESTION SEQUENCE (#2)
  1. S CTNTIEN=$$FINDCTNT^YS119PS0(TSTIEN,"305.")
  1. S CHGS(2)=3060
  1. D UPDANY^YS119PS0(601.76,CTNTIEN,.CHGS)
  1. S CTNTIEN=$$FINDCTNT^YS119PS0(TSTIEN,"306.")
  1. S CHGS(2)=3070
  1. D UPDANY^YS119PS0(601.76,CTNTIEN,.CHGS)
  1. D UPDDT^YS119PS0(TSTIEN)
  1. Q
  1. MOCA ; fix MOCA* misspellings
  1. D FIXMOCA("MOCA","5D.")
  1. D FIXMOCA("MOCA ALT 1","5D.")
  1. D FIXMOCA("MOCA ALT 2","5D.")
  1. Q
  1. FIXMOCA(NAME,DESIG) ; fix MOCA mis-spellings
  1. N TSTIEN,QUIEN,SCALE,KEY,SPEC,CHGS
  1. S SPEC("substract")="subtract"
  1. S TSTIEN=$$FINDTEST^YS119PS0(NAME)
  1. S QUIEN=$$FINDQD^YS119PS0(TSTIEN,DESIG)
  1. S SCALE=$$FINDSCL^YS119PS0($$FINDSGRP^YS119PS0(TSTIEN))
  1. S KEY=0 F S KEY=$O(^YTT(601.91,"AC",SCALE,KEY)) Q:'KEY D
  1. . I $P(^YTT(601.91,KEY,0),U,3)'=QUIEN Q
  1. . ; update MH SCORING KEYS: TARGET (#3)
  1. . S CHGS(3)=$$REPLACE^XLFSTR($P(^YTT(601.91,KEY,0),U,4),.SPEC)
  1. . D UPDANY^YS119PS0(601.91,KEY,.CHGS)
  1. D UPDDT^YS119PS0(TSTIEN)
  1. Q
  1. PCPTSD ; fix PC-PTSD scale name and report
  1. N TSTIEN,IEN,CHGS
  1. S TSTIEN=$$FINDTEST^YS119PS0("PC PTSD") ; (not to be confused with PC-PTSD)
  1. S IEN=$$FINDSCL^YS119PS0($$FINDSGRP^YS119PS0(TSTIEN))
  1. ; update MH SCALES: SCALE NAME (#3)
  1. S CHGS(3)="PC PTSD Total"
  1. D UPDANY^YS119PS0(601.87,IEN,.CHGS)
  1. ; update MH REPORT: switch score to <-PC PTSD Total->
  1. S IEN=$$FINDRPT^YS119PS0(TSTIEN)
  1. D UPDRPT^YS119PS0(IEN,"PCPTSDRP","YS119PS1")
  1. D UPDDT^YS119PS0(TSTIEN)
  1. Q
  1. PCPTSDRP ;
  1. ;;.| .| Primary Care PTSD Screen| | Date Given: <.Date_Given.>| Clinician: <.Staff_Ordered_By.>| Location: <.Location.>| | Veteran: <.Patient_Name_Last_First.>| SSN: <.Patient_SSN.>| DOB:
  1. ;;<.Patient_Date_Of_Birth.> (<.Patient_Age.>)| Gender: <.Patient_Gender.>| | | PC PTSD Screen Score: <-PC PTSD Total->| | <.DLL_String.>| | | Questions and Answers| | 1. Have had any nightmares about it or
  1. ;;thought about it when you did not want to?| <*Answer_3826*>| 2. Tried hard not to think about it or went out of your way to avoid situations that remind you of it?| <*Answer_3827*>| 3. Were
  1. ;;constantly on guard, watchful, or easily startled?| <*Answer_3828*>| 4. Felt numb or detached from others, activities, or your surroundings?| <*Answer_3829*>| | | Information contained in
  1. ;;this note is based on a self-report assessment and is not sufficient to use alone for diagnostic purposes. Assessment results should be verified for accuracy and used in conjunction with other
  1. ;;diagnostic activities and procedures.| $~
  1. ;;zzzzz
  1. ;
  1. PHQ9 ;
  1. N TSTIEN,IEN,CHGS
  1. S TSTIEN=$$FINDTEST^YS119PS0("PHQ9")
  1. S IEN=$$FINDSCL^YS119PS0($$FINDSGRP^YS119PS0(TSTIEN))
  1. ; update MH SCALES: SCALE NAME (#3)
  1. S CHGS(3)="PHQ9"
  1. D UPDANY^YS119PS0(601.87,IEN,.CHGS)
  1. ; update MH REPORT: switch score to <-PHQ9->
  1. S IEN=$$FINDRPT^YS119PS0(TSTIEN)
  1. D UPDRPT^YS119PS0(IEN,"PHQ9RPT","YS119PS1")
  1. D UPDDT^YS119PS0(TSTIEN)
  1. Q
  1. PHQ9RPT ;
  1. ;;.|.|Patient Health Questionnaire - 9 (PHQ-9)||Date Given: <.Date_Given.>|Clinician: <.Staff_Ordered_By.>|Location: <.Location.>||Veteran: <.Patient_Name_Last_First.>|SSN: <.Patient_SSN.>|DOB:
  1. ;;<.Patient_Date_Of_Birth.> (<.Patient_Age.>)|Gender: <.Patient_Gender.>|| PHQ-9 Depression Scale Score: <-PHQ9->| |Guide for Interpreting PHQ-9 scores:| 0-4: The score suggests the patient may not
  1. ;;need depression treatment.| 5-14: Physician uses clinical judgment about treatment based on | patient's duration of symptoms and functional impairment.| 15 or more: Warrants treatment
  1. ;;for depression, using antidepressant, | psychotherapy and/or a combination of treatment.||Questions and Answers||Over the last 2 weeks, how often have you been bothered by any of the
  1. ;;following problems?|1. Little interest or pleasure in doing things| <*Answer_3374*>|2. Feeling down, depressed, or hopeless| <*Answer_3375*>|3. Trouble falling or staying asleep, or sleeping
  1. ;;too much| <*Answer_3376*>|4. Feeling tired or having little energy| <*Answer_3377*>|5. Poor appetite or overeating| <*Answer_3378*>|6. Feeling bad about yourself or that you are a failure or
  1. ;;have let yourself or your family down| <*Answer_3379*>|7. Trouble concentrating on things, such as reading the newspaper or watching television| <*Answer_3380*>|8. Moving or speaking so slowly
  1. ;;that other people could have noticed. Or the opposite being so fidgety or restless that you have been moving around a lot more than usual| <*Answer_3381*>|9. Thoughts that you would be better off
  1. ;;dead or of hurting yourself in some way| <*Answer_3382*>|10. If you checked off any problems, how DIFFICULT have these problems made it for you to do your work, take care of things at home or get
  1. ;;along with other people?| <*Answer_4019*>||Information contained in this note is based on a self report assessment and is not sufficient to use alone for diagnostic purposes. Assessment results
  1. ;;should be verified for accuracy and used in conjunction with other diagnostic activities.||Copyright 2001 Pfizer Inc.|All rights reserved. Reproduced with permission of Pfizer Inc.|PRIME-MD is a
  1. ;;trademark of Pfizer Inc $~
  1. ;;zzzzz
  1. ;
  1. WAISR ; make case in scoring keys for WAI-SR match case in choices
  1. N TSTIEN,SGIEN,SCALE,KEY,CHGS
  1. S TSTIEN=$$FINDTEST^YS119PS0("WAI-SR")
  1. S SGIEN=$$FINDSGRP^YS119PS0(TSTIEN)
  1. S SCALE=0 F S SCALE=$O(^YTT(601.87,"AD",SGIEN,SCALE)) Q:'SCALE D
  1. . S KEY=0 F S KEY=$O(^YTT(601.91,"AC",SCALE,KEY)) Q:'KEY D
  1. . . I $P(^YTT(601.91,KEY,0),U,4)'="Fairly Often" Q
  1. . . ; update MH SCORING KEYS: TARGET (#3)
  1. . . S CHGS(3)="Fairly often"
  1. . . D UPDANY^YS119PS0(601.91,KEY,.CHGS)
  1. D UPDDT^YS119PS0(TSTIEN)
  1. Q