Difference between revisions of "ROUTINE C9CGMTSOBJ"

From VistApedia
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
__TOC__
+
== VERSIONS ==
<pre>
+
* [[ROUTINE_C9CGMTSOBJ_*58,63,LOCAL*_ZTPP| C9CGMTSOBJ with patches 58,63,LOCAL printed by ZTPP]]
182 +17    D OPEN^%ZISH("WRITEFILE",GMTSPATH,GMTSFILE,"W"),DIS(+($G(DFN)),+($G
+
=== LINKS ===
            (OBJ)))
+
[[CATEGORY:ROUTINE]]
183 +18    D CLOSE^%ZISH("WRITEFILE") K ^TMP("GMTSOBJ",$J,"OGBL")
 
184 +19    S Y=$$FTG^%ZISH(GMTSPATH,GMTSFILE,$NA(^TMP("GMTSOBJ",$J,"OGBL",1)),
 
            4)
 
185 +20    S GMTSHFN(GMTSFILE)="",Y=$$DEL^%ZISH(GMTSPATH,$NA(GMTSHFN))
 
186 +21    S (GMTSBLK,GMTSNCT,GMTSPRE)=0 S GMTSNN="^TMP(""GMTSOBJ"","_$J_",""O
 
            GBL"")"
 
187 +22    S GMTSNC="^TMP(""GMTSOBJ"","_$J_",""OGBL"","
 
188 +23    F  S GMTSNN=$Q(@GMTSNN) Q:GMTSNN=""!(GMTSNN'[GMTSNC)  D
 
189 +24    . S GMTSND=@GMTSNN,GMTSNDT=$$TRIM^C9CGMTSOBV(GMTSND)
 
190 +25    . I 'GMTSBLK S:GMTSNDT="" GMTSBLK=1 Q:GMTSBLK
 
191 +26    . Q:GMTSPRE&(GMTSNDT="")  S GMTSNCT=GMTSNCT+1
 
192 +27    . S @(GMTSRTO_GMTSNCT_",0)")=GMTSND
 
193 +28    . S @GMTS0=$G(@GMTS0)+1
 
194 +29    . S GMTSPRE=$S(GMTSNDT="":1,1:0)
 
195 +30    K ^TMP("GMTSOBJ",$J,"OGBL")
 
196 +31    Q
 
197 +32    ;
 
</pre>
 
== SHOW^C9CGMTSOBJ ==
 
<pre>
 
198 SHOW(X) ; Show a Health Summary Object Definition
 
199 +1    ;
 
200 +2    ;  Input    X      IEN for Health Summary Object (#142.5)
 
201 +3    ;
 
202 +4    D SO^C9CGMTSOBS(+($G(X)))
 
203 +5    Q
 
</pre>
 
== EXTRACT^C9CGMTSOBJ ==
 
<pre>
 
204 EXTRACT(X,ARY) --
 
            ; Show a Health Summary Object Definition
 
205 +1    ;
 
206 +2    ;  Input    X      IEN for Health Summary Object (#142.5)
 
207 +3    ;  Output  ARY()  Array of fields and values
 
208 +4    ;                    (passed by reference)
 
209 +5    ;
 
210 +6    ;      ARY(IEN,<field #>,"I") = Internal Value
 
211 +7    ;      ARY(IEN,<field #>,"E") = External Value
 
212 +8    ;      ARY(IEN,<field #>,"NAME") = Field Name
 
213 +9    ;      ARY(IEN,<field #>,"PROMT") = Mixed Case of Field Name
 
214 +10    ;
 
215 +11    D GET^C9CGMTSOBS2(+($G(X)),.ARY)
 
216 +12    Q
 
</pre>
 
== DEF^C9CGMTSOBJ ==
 
<pre>
 
217 DEF(X,ARY) --
 
            ; Extract a Health Summary Object Definition
 
218 +1    ;
 
219 +2    ;  Input    X      IEN for Health Summary Object (#142.5)
 
220 +3    ;  Output  ARY()  Array of fields and values
 
221 +4    ;                    (passed by reference)
 
222 +5    ;
 
223 +6    ;      ARY("D",0) = # of lines in Definition
 
224 +7    ;      ARY("D",#) = Definition Text
 
225 +8    ;      ARY("E",0) = # of lines in Example
 
226 +9    ;      ARY("E",#) = Example Text
 
227 +10    ;
 
228 +11    D DEF^C9CGMTSOBS(+($G(X)),.ARY)
 
229 +12    Q
 
</pre>
 
== DIS^C9CGMTSOBJ ==
 
<pre>
 
230 DIS(DFN,OBJ) --
 
            ; Display Object
 
231 +1    ;
 
232 +2    ;  Input    DFN    IEN for Patient (#2)
 
233 +3    ;            OBJ    IEN for Health Summary Object (#142.5)
 
234 +4    ;
 
235 +5    ;  Output  Display of Health Summary data
 
236 +6    ;
 
237 +7    D DIS^C9CGMTSOBS2(+($G(DFN)),$G(OBJ))
 
238 +8    Q
 
239 STMP  ; Show TMP
 
240 +1    N GMTSNN,GMTSNC S GMTSNN="^TMP(""GMTSOBJ"","_$J_",""OGBL"")",GMTSNC
 
            ="^TMP(""GMTSOBJ"","_$J_",""OGBL"","
 
241 +2    F  S GMTSNN=$Q(@GMTSNN) Q:GMTSNN=""!(GMTSNN'[GMTSNC)  W !,GMTSNN,"=
 
            ",@GMTSNN
 
242 +3    Q
 
</pre>
 

Latest revision as of 19:15, 7 May 2015

VERSIONS

LINKS