User Tools

Site Tools


planning:userguide:results_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
planning:userguide:results_api [2018/08/21 19:43] – [Processing a Function] kerhartplanning:userguide:results_api [2021/07/29 18:24] (current) – external edit 127.0.0.1
Line 30: Line 30:
 These are the recommended functions to be used when interfacing with the Planning App ResultsAPI, as they will ensure compatibility with past and future versions of the ResultsAPI. These are the recommended functions to be used when interfacing with the Planning App ResultsAPI, as they will ensure compatibility with past and future versions of the ResultsAPI.
  
-Context based ResultsAPI functions are signified by names prefixed with "api_" (e.g.: //api_generate_plan_summary_request//). These functions check the Thinknode Planning App version context that was used to publish (approve) or last edit the treatment plan and attempt to return a calculation_request for the Planning App version context that was captured in the treatment plan.+Context based ResultsAPI functions are signified by names prefixed with "api_" (e.g.: //api_generate_plan_summary_request//). These functions check the Thinknode Planning App version context that was used to publish (approve) or last edit the treatment plan and attempt to return a calculation_request for the Planning App version context that was captured in the treatment plan. Since these functions check for the proper context within the provided treatment plan, it's safe to call these functions using any Planning App version that is newer than that of the treatment plan being used as input.
  
 /*The context based functions provide compatibility for treatment plans that have been created using past versions of the Planning App and thus may have differing ResultsAPI functions or functions with differing signatures. This is achieved by these functions: /*The context based functions provide compatibility for treatment plans that have been created using past versions of the Planning App and thus may have differing ResultsAPI functions or functions with differing signatures. This is achieved by these functions:
Line 51: Line 51:
   * If the ResultsAPI function signature has changed, the calculation request will be constructed for the Planning ResultsAPI version that corresponds for the returned context ID.   * If the ResultsAPI function signature has changed, the calculation request will be constructed for the Planning ResultsAPI version that corresponds for the returned context ID.
  
-=== Processing a Function ===+=== Function Usage ===
  
 These context based ResultsAPI functions return a special type of calculation request object that is not directly usable within a Thinknode META request as they contain the additional context data needed to ensure the desired calculation is performed with the appropriate Astroid Planning App version. The process of running a context based ResultsAPI request consists of the following steps: These context based ResultsAPI functions return a special type of calculation request object that is not directly usable within a Thinknode META request as they contain the additional context data needed to ensure the desired calculation is performed with the appropriate Astroid Planning App version. The process of running a context based ResultsAPI request consists of the following steps:
Line 57: Line 57:
   * Submit the initial "api_*" function request as a normal (non-META) calculation using the current Planning App context   * Submit the initial "api_*" function request as a normal (non-META) calculation using the current Planning App context
   * Retrieve the result of the above calculation and get the context ID   * Retrieve the result of the above calculation and get the context ID
-  * Perform a META request using the above context, setting the META Generator as the calculation object portion of the above "api_*" function result (if it's not null)+  * Perform a META request using the above context, setting the META Generator as the request portion of the above "api_*" function result (if it's not null)
 ==== Non-context based ResultsAPI functions ==== ==== Non-context based ResultsAPI functions ====
  
planning/userguide/results_api.1534880620.txt.gz · Last modified: 2021/07/29 18:22 (external edit)