SDESCLNSEARCH ;ALB/MGD,BWF,JAS - CLINIC NAME SEARCH AND LIMITED DATA RETURN ;NOV 07, 2024
Source file <SDESCLNSEARCH.m>
| Name | Comments | DBIA/ICR reference | 
|---|---|---|
| SEARCHCLIN(JSONRETURN,SEARCHSTRING,STATION,DATE) | ;Search for clinics and provide return of matches and limited date in JSON STRING
 ; INPUT ; SEARCHSTRING (Req) = free text string that represents the recall clinic name that will be searched ; STATION (Opt) = Station Number: If present, the search would be limited to matching clinics at the given institution. ; If absent, the search would take place across all divisions/institutions. Example values: 534, 534GB ; DATE (Opt) = Date in ISO 8601 format to use for Clinic Status verification. If not passed in, default to DT. ; OUTPUT - JSONRETURN ; List of Recall Clinics from the RECALL REMINDERS (#403.5) file with the following data. ; Field List: ; 1. Clinic IEN ; 2. Clinic name ; 3. Patient friendly name ; 4. Default provider IEN ; 5. Default Provider name ; 6. Default Provider SECID ; 7. Stop code IEN ; 8. Stop code NAME ; 9. Stop code AMIS ; 10. Credit stop code IEN ; 11. Credit stop code name ; 12. Credit stop code AMIS ; 13. Status (Active or Inactive) If not passed in, default to DT ; 14. Non-count (Y or N)  | 
|
| VALIDATEINPUT(ERRORLIST,SEARCHSTRING,STATION,DATE) | ; validate incoming parameters
 ; input - ERRORLIST = passed in by reference, represents the errors that could be generated when validating the searchstring ; SEARCHSTRING = represents the name or partial name of the Recall Clinic ; STATION = Station Number ; returns 0 or 1 ; 0 = no validation errors ; 1 = validation errors  | 
|
| GETCLINICLIST(SEARCHSTRING,STATION,DATE,CLINICLIST) | ; pull matching recall clinics using the first input parameter passed in by the RPC
 ; Input - SEARCHSTRING = string that represents the name of the recall clinic ; STATION = Station Number ; DATE = Fileman Date to use for Clinic Status verification ; CLINICLIST = passed in by reference; represents the array that will be returned as output ; Output - CLINICLIST = list of recall clinic names, clinic IENs and the associated recall reminder IENs.  | 
|
| BUILDRETURN(CLINICIEN,CLINCNT,CLINICLIST) | ;Build return array with recall reminder clinic data
 ; input - CLINICIEN = IEN of clinic in #44 ; CLINICLIST = passed by reference, represents the array of recall clinics and associated data that will be returned to the client ; output - CLINICLIST = recall clinic array and their associated data to be sent back to the client  | 
|
| WRONGDIVISION(CLINICIEN,STATION) | ;
 ; Screen out Clinics that don't match passed in Station Number  | 
| RPC Name | Call Tags | 
|---|---|
| SDES SEARCH CLINIC ATTRIBUTES | SEARCHCLIN | 
| FileNo | Call Tags | 
|---|---|
| ^VA(200 - [#200] | GET1^DIQ | 
| ^DIC(4 - [#4] | FIND^DIC, GET1^DIQ | 
| ^DIC(40.7 - [#40.7] | GET1^DIQ | 
| ^DG(40.8 - [#40.8] | GET1^DIQ | 
| ^SDEC(409.94 - [#409.94] | GET1^DIQ | 
| ^SC - [#44] | FIND^DIC, GET1^DIQ, GETS^DIQ | 
| 44.1 | GET1^DIQ |