SCMC INACTIVATED (875)    SORT TEMPLATE (.401)

Name Value
NAME SCMC INACTIVATED
DESCRIPTION
Patient inactivated automatically.
SORT FIELD DATA
  • FILE OR SUBFILE NO.:   404.43
    GET CODE:   S DISX(1)=$P($G(^SCPT(404.43,D0,0)),U,12)
    QUERY CONDITION:   I (DISX(1)]]"DBz")&(DISX(1)']]"RP")
    DESCRIPTION OF SORT:   STATUS from DC (DISCHARGE FROM CARE) to RP (REQ BY PAT)
    DATA TYPE FOR SORTING:   SET OF CODES
    FIELD NO.:   .12
    FIELD NAME:   STATUS
    SORT QUALIFIERS BEFORE FIELD:   '
    FROM VALUE INTERNAL:   DBz
    FROM VALUE EXTERNAL:   DC
    FROM VALUE PRINTABLE:   DC (DISCHARGE FROM CARE)
    TO VALUE INTERNAL:   RP
    TO VALUE EXTERNAL:   RP
    TO VALUE PRINTABLE:   RP (REQ BY PAT)
    CROSS REFERENCE DATA:   ^SCPT(404.43,"ASTATB",^SCPT(404.43,^2
  • FILE OR SUBFILE NO.:   404.43
    GET CODE:   S DISX(2)=$P($G(^SCPT(404.43,D0,0)),U,4)
    QUERY CONDITION:   I DISX(2)]]3080215.999999
    DESCRIPTION OF SORT:   POSITION UNASSIGNED DATE from Feb 16,2008
    DATA TYPE FOR SORTING:   DATE/TIME
    FIELD NO.:   .04
    FIELD NAME:   POSITION UNASSIGNED DATE
    SORT QUALIFIERS BEFORE FIELD:   @'
    FROM VALUE INTERNAL:   3080215.999999
    FROM VALUE EXTERNAL:   FEB 16,2008
    FROM VALUE PRINTABLE:   Feb 16,2008
    TO VALUE INTERNAL:   z
  • FILE OR SUBFILE NO.:   404.57
    GET CODE:   X DPP(3,"OVF100",9.2) S X=$P($G(^DIC(4,+$P(Y(201),U,7),0)),U) S D0=I(100,0) I D0>0 S DISX(3)=X
    QUERY CONDITION:   I DISX(3)'=""
    DESCRIPTION OF SORT:   TEAM:INSTITUTION not null
    DATA TYPE FOR SORTING:   FREE TEXT
    COMPUTED FIELD CODE:   X DPP(3,"OVF100",9.2) S X=$P($G(^DIC(4,+$P(Y(201),U,7),0)),U) S D0=I(100,0) I D0>0 S DISX(3)=X
    RELATIONAL JUMP FIELD DATA:
    • RELATIONAL START FILE NO.:   404.43
      NEXT SUBSCRIPT:   100
      TO FILE OR SUBFILE:   404.57
      GLOBAL REFERENCE:   SCTM(404.57,
      MULTIVALUED FLAG:   NOT MULTI-VALUED
      RELATIONAL CODE:   S I(0,0)=D0 S Y(1)=$S($D(^SCPT(404.43,D0,0)):^(0),1:"") S X=$P(Y(1),U,2),X=X S D(0)=+X
    OVERFLOW DATA:
    • FIRST SUBSCRIPT FOR OVERFLOW:   OVF100
      SECOND SUBSCRIPT FOR OVERFLOW:   9.2
      OVERFLOW CODE:   S I(100,0)=$G(D0),Y(101)=$S($D(^SCTM(404.57,D0,0)):^(0),1:""),D0=$P(Y(101),U,2) S:'D0!'$D(^SCTM(404.51,+D0,0)) D0=-1 S Y(201)=$S($D(^SCTM(404.51,D0,0)):^(0),1:"")
    FIELD NAME:   TEAM:INSTITUTION
    SORT QUALIFIERS BEFORE FIELD:   ""
    SORT QUALIFIERS AFTER FIELD:   ;"Institution: "
  • FILE OR SUBFILE NO.:   404.42
    GET CODE:   S Y(101)=$S($D(^SCPT(404.42,D0,0)):^(0),1:"") S X=$P($G(^SCTM(404.51,+$P(Y(101),U,3),0)),U) I D0>0 S DISX(4)=X
    QUERY CONDITION:   I DISX(4)'=""
    DESCRIPTION OF SORT:   TEAM ASSIGNMENT not null
    DATA TYPE FOR SORTING:   FREE TEXT
    COMPUTED FIELD CODE:   S Y(101)=$S($D(^SCPT(404.42,D0,0)):^(0),1:"") S X=$P($G(^SCTM(404.51,+$P(Y(101),U,3),0)),U) I D0>0 S DISX(4)=X
    RELATIONAL JUMP FIELD DATA:
    • RELATIONAL START FILE NO.:   404.43
      NEXT SUBSCRIPT:   100
      TO FILE OR SUBFILE:   404.42
      GLOBAL REFERENCE:   SCPT(404.42,
      MULTIVALUED FLAG:   NOT MULTI-VALUED
      RELATIONAL CODE:   S I(0,0)=D0 S Y(1)=$S($D(^SCPT(404.43,D0,0)):^(0),1:"") S X=$P(Y(1),U,1),X=X S D(0)=+X
    FIELD NAME:   TEAM ASSIGNMENT
    SORT QUALIFIERS BEFORE FIELD:   "".03
  • FILE OR SUBFILE NO.:   404.57
    GET CODE:   S X=$P($$GETPRTP^SCAPMCU2(D0,DT),U,2) S DISX(5)=X
    QUERY CONDITION:   I 1
    DESCRIPTION OF SORT:   All CURRENT PRACTITIONER (includes nulls)
    DATA TYPE FOR SORTING:   FREE TEXT
    RELATIONAL JUMP FIELD DATA:
    • RELATIONAL START FILE NO.:   404.43
      NEXT SUBSCRIPT:   100
      TO FILE OR SUBFILE:   404.57
      GLOBAL REFERENCE:   SCTM(404.57,
      MULTIVALUED FLAG:   NOT MULTI-VALUED
      RELATIONAL CODE:   S I(0,0)=D0 S Y(1)=$S($D(^SCPT(404.43,D0,0)):^(0),1:"") S X=$P(Y(1),U,2),X=X S D(0)=+X
    FIELD NO.:   304
    FIELD NAME:   CURRENT PRACTITIONER
    SORT QUALIFIERS BEFORE FIELD:   "
    FROM VALUE INTERNAL:   ?z
    FROM VALUE EXTERNAL:   @
    TO VALUE INTERNAL:   z
  • FILE OR SUBFILE NO.:   404.42
    GET CODE:   S Y(101)=$S($D(^SCPT(404.42,D0,0)):^(0),1:"") S X=$P($G(^DPT(+$P(Y(101),U,1),0)),U) I D0>0 S DISX(6)=X
    QUERY CONDITION:   I DISX(6)'=""
    DESCRIPTION OF SORT:   PATIENT not null
    DATA TYPE FOR SORTING:   FREE TEXT
    COMPUTED FIELD CODE:   S Y(101)=$S($D(^SCPT(404.42,D0,0)):^(0),1:"") S X=$P($G(^DPT(+$P(Y(101),U,1),0)),U) I D0>0 S DISX(6)=X
    RELATIONAL JUMP FIELD DATA:
    • RELATIONAL START FILE NO.:   404.43
      NEXT SUBSCRIPT:   100
      TO FILE OR SUBFILE:   404.42
      GLOBAL REFERENCE:   SCPT(404.42,
      MULTIVALUED FLAG:   NOT MULTI-VALUED
      RELATIONAL CODE:   S I(0,0)=D0 S Y(1)=$S($D(^SCPT(404.43,D0,0)):^(0),1:"") S X=$P(Y(1),U,1),X=X S D(0)=+X
    FIELD NAME:   PATIENT
    SORT QUALIFIERS BEFORE FIELD:   "".01
DATE CREATED 2014-06-24 19:11:00
READ ACCESS @
FILE PATIENT TEAM POSITION ASSIGNMENT
WRITE ACCESS @
DATE LAST USED 2014-06-24 00:00:00