Ignore:
Timestamp:
Feb 21, 2013, 7:57:31 PM (12 years ago)
Author:
Sam Habiel
Message:

Medications: Can now add a fake prescription to the record

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fmts/trunk/p/C0XGET3.m

    r1604 r1609  
    1 C0XGET3 ; VEN/SMH - Sam's Getters... let's try to make them simple ;2013-02-04  12:00 PM
     1C0XGET3 ; VEN/SMH - Sam's Getters... let's try to make them simple ;2013-02-20  11:50 AM
    22 ;;1.1;FILEMAN TRIPLE STORE;
    33 ;
     
    3333 Q:$L(EP) $$GSPO1(G,O,EP) ; if we have an extended predicate, recurse
    3434 Q ^C0X(201,O,0) ; this is the end point of the recursion.
     35 ;
     36GSPO(R,G,S,P) ; Public Proc; Get Objects for a Graph/Subject/Predicate combination
     37 ; Supports forward relational navigation for predicates using "." as separator
     38 ; R is global style RPC reference
     39 ; Extended Predicates are assumed to have only one object
     40 ; This routine doesn't process multiple objects for the extended predicate.
     41 N EP S EP=$P(P,".",2,99) ; Extended Predicate
     42 S P=$P(P,".") ; Predicate becomes the first piece
     43 N O S O=""
     44 F  S O=$O(^C0X(101,"GSPO",$$IEN(G),$$IEN(S),$$IEN(P),O)) Q:O=""  D  ; For each object
     45 . I $L(EP) D  ; If we have an extended predicate...
     46 . . I EP="*" N P S P="" F  S P=$O(^C0X(101,"GSPO",$$IEN(G),$$IEN(O),P)) Q:P=""  D  ; If all predicates (EP=*) for each predicate
     47 . . . S @R@(O,$$NSP^C0XUTIL(P))=$$GSPO1(G,O,P) ; Return (Object, namespaced predicate)=value
     48 . . E  S @R@(O)=$$GSPO1(G,O,EP)  ; If Extended Predicate, resolve the predicate to get ultimate object
     49 . E  S @R@(O)=^C0X(201,O,0) ; Otherwise, just return the object
     50 QUIT
Note: See TracChangeset for help on using the changeset viewer.