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

ONCSAPI.m

Go to the documentation of this file.
  1. ONCSAPI ;Hines OIFO/SG - ONCOLOGY WEB-SERVICE ; 12/7/06 10:37am
  1. ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
  1. ;
  1. ; ONCSAPI ------------- API DESCRIPTOR
  1. ;
  1. ; ONCSAPI(
  1. ;
  1. ; "DEBUG") Debug mode
  1. ; 0 Disabled
  1. ; 1 Enabled
  1. ;
  1. ; "MSG", ""
  1. ; IEN,
  1. ; 0) Error Descriptor
  1. ; ^01: Error Code (see MSGLIST^ONCSAPIE)
  1. ; ^02: Error Message
  1. ; ^03: Label+Offset (optional)
  1. ; ^04: Routine (optional)
  1. ; 1,i) Error details (text)
  1. ; "E",
  1. ; Error Code,
  1. ; IEN) ""
  1. ;
  1. ; ^XTMP("ONCSAPI") ---- LOCAL CACHE FOR WEB-SERVICE DATA
  1. ;
  1. ; ^XTMP("ONCSAPI",
  1. ;
  1. ; 0) Node descriptor
  1. ; ^01: Purge date (FileMan)
  1. ; ^02: Create date (FileMan)
  1. ; ^03: Description
  1. ;
  1. ; "EDITS", Metafile Version
  1. ; IEN,
  1. ; 0) Edit Descriptor
  1. ; ^01: Index in the edit set
  1. ; ^02: Name
  1. ; "D",i) Description
  1. ; "H",i) Help
  1. ; "ES",
  1. ; EditSetName,
  1. ; EditIndex) IEN
  1. ;
  1. ; "SCHEMAS",
  1. ; Schema#,
  1. ; 0) Schema name
  1. ;
  1. ; "N",
  1. ; Name) Schema#
  1. ;
  1. ; "SH",
  1. ; Site,Hist) Schema#
  1. ;
  1. ; "TABLES", DLL Version
  1. ;
  1. ; IEN,
  1. ; 0) Table descriptor
  1. ; ^01: Number of rows
  1. ; ^02: Schema number
  1. ; ^03: Table number
  1. ; ^04: Table pattern
  1. ; ^05: Table title
  1. ; ^06: Table subtitle
  1. ; Row#,
  1. ; 1) Codes
  1. ; ^01: Row code
  1. ; ^02: Additional code #1
  1. ; ^03: Additional code #2
  1. ; ^04: ...
  1. ; 3,i) Description (text)
  1. ;
  1. ; "C",
  1. ; RowCode) Descriptor
  1. ; ^01: Row#
  1. ; ^02: Upper boundary (for intervals)
  1. ;
  1. ; "FN",
  1. ; Note#,i) Footnote (text)
  1. ; "TN",
  1. ; Note#,i) Note (text)
  1. ;
  1. ; "ST",
  1. ; Schema#,
  1. ; Table#) IEN
  1. ;
  1. ; CS TABLE NUMBER ----- TABLE DESCRIPTION
  1. ;
  1. ; 1 CS Tumor Size
  1. ; 2 CS Extension
  1. ; 3 CS Size/Ext Eval
  1. ; 4 CS Lymph Nodes
  1. ; 5 CS Reg Nodes Eval
  1. ; 6 Regional Nodes Positive
  1. ; 7 Regional Nodes Examined
  1. ; 8 CS Mets at DX
  1. ; 9 CS Mets Eval
  1. ; 10 CS Site-Specific Factor 1
  1. ; 11 CS Site-Specific Factor 2
  1. ; 12 CS Site-Specific Factor 3
  1. ; 13 CS Site-Specific Factor 4
  1. ; 14 CS Site-Specific Factor 5
  1. ; 15 CS Site-Specific Factor 6
  1. ; 16 CS Site-Specific Factor 7
  1. ; 17 CS Site-Specific Factor 8
  1. ; 18 CS Site-Specific Factor 9
  1. ; 19 CS Site-Specific Factor 10
  1. ; 20 CS Site-Specific Factor 11
  1. ; 21 CS Site-Specific Factor 12
  1. ; 22 CS Site-Specific Factor 13
  1. ; 23 CS Site-Specific Factor 14
  1. ; 24 CS Site-Specific Factor 15
  1. ; 25 CS Site-Specific Factor 16
  1. ; 26 CS Site-Specific Factor 17
  1. ; 27 CS Site-Specific Factor 18
  1. ; 28 CS Site-Specific Factor 19
  1. ; 29 CS Site-Specific Factor 20
  1. ; 30 CS Site-Specific Factor 21
  1. ; 31 CS Site-Specific Factor 22
  1. ; 32 CS Site-Specific Factor 23
  1. ; 33 CS Site-Specific Factor 24
  1. ; 34 CS Site-Specific Factor 25
  1. ; 35 Histologies
  1. ;
  1. ; CS ENTRY POINT ------ DESCRIPTION
  1. ;
  1. ; HELP^ONCSAPI1 Displays the field's valid codes
  1. ; INPUT^ONCSAPI1 Checks if the code is valid
  1. ;
  1. ; $$CALC^ONCSAPI3 Calculates the staging values
  1. ;
  1. ; $$SCHEMA^ONCSAPIS Returns schema number
  1. ;
  1. ; $$CODEDESC^ONCSAPIT Loads the CS code description
  1. ; $$GETCSTBL^ONCSAPIT Returns table IEN (loads table if necessary)
  1. ;
  1. ; EDITS ENTRY POINT --- DESCRIPTION
  1. ;
  1. ; $$RBQEXEC^ONCSED01 Executes the 'Run Batch' EDITS request
  1. ; $$RBQPREP^ONCSED01 Starts preparation of the 'Run Batch' request
  1. ;
  1. ; $$REPORT^ONCSED01 Prints EDITS report generated by the
  1. ; $$RBQEXEC^ONCSED01
  1. ;
  1. ; $$GETEDESC^ONCSED04 Returns the edit description node
  1. ; $$GETEDHLP^ONCSED04 Returns the edit help text node
  1. ;
  1. ; UTILITY ------------- DESCRIPTION
  1. ;
  1. ; DEMO^ONCSAPI Demonstration entry point
  1. ;
  1. ; CLEAR^ONCSAPIE Initializes the error stack
  1. ; $$DBS^ONCSAPIE Cehcks for FileMan DBS errors
  1. ; $$ERROR^ONCSAPIE Generates an error message
  1. ; $$MSG^ONCSAPIE Returns the text and type of the message
  1. ; PRTERRS^ONCSAPIE Displays the error messages
  1. ; STORE^ONCSAPIE Stores the message into the error stack
  1. ;
  1. ; $$CHKERR^ONCSAPIR Checks for parsing and web-service errors
  1. ; HEADER^ONCSAPIR Generates the request header
  1. ; $$PARAMS^ONCSAPIR Converts input parameters into XML format
  1. ; PUT^ONCSAPIR Adds element/text to the destination buffer
  1. ; $$REQUEST^ONCSAPIR Sends the request and gets the response
  1. ; TRAILER^ONCSAPIR Generates the request trailer
  1. ;
  1. ; $$GETCSURL^ONCSAPIU Returns the Oncology web-service URL
  1. ; $$PAGE^ONCSAPIU Pauses the output at page end
  1. ; $$UPDCSURL^ONCSAPIU Updates the Oncology web-service URL
  1. ; WW^ONCSAPIU Wraps the string and prints it
  1. ; ZW^ONCSAPIU Emulates and extends the ZWRITE command
  1. ;
  1. ; $$CHKVER^ONCSAPIV Checks version of the local cache
  1. ; $$VERSION^ONCSAPIV Returns versions of web-service components
  1. ;
  1. ; BEGIN^ONCSNACR Starts the NAACCR record output
  1. ; END^ONCSNACR Finishes the NAACCR record output
  1. ; WRITE^ONCSNACR Outputs the piece of the NAACCR record
  1. ;
  1. ; INITIALS ------------ DEVELOPER
  1. ;
  1. ; SG Sergey Gavrilov
  1. ;
  1. Q
  1. ;
  1. ;***** DEMO ENTRY POINT
  1. DEMO ;
  1. N DA,DIR,DIRUT,DTOUT,DUOUT,ONCSAPI,X,Y
  1. ;
  1. ;--- Debug mode?
  1. K DIR S DIR(0)="Y"
  1. S DIR("A")="Run in debug mode"
  1. S DIR("B")="NO"
  1. D ^DIR Q:$D(DIRUT)
  1. S:Y ONCSAPI("DEBUG")=1
  1. ;
  1. ;--- Select and run a demo
  1. DEMOSEL K DIR S DIR(0)="SO^C:Collaborative Staging;E:EDITS"
  1. S DIR("A")="Select a demo"
  1. D ^DIR Q:$D(DIRUT)
  1. D G DEMOSEL
  1. . I Y="C" D DEMO^ONCSAPID(.ONCSAPI) Q ; Collaborative Staging
  1. . I Y="E" D DEMO^ONCSEDEM(.ONCSAPI) Q ; EDITS