Read in pipe delimited report. Create & Discharge appoit

Clovertech Forums Read Only Archives Cloverleaf General Read in pipe delimited report. Create & Discharge appoit

  • Creator
    Topic
  • #55588
    Charles Kageni
    Participant

      The aim is to achieve the following

      -Read the file into the interface line by line (set in the thread settings)

      -For each message (line of the file)

      Create an appointment:- post  /appointments/create

      Discharge the appointment :- put  /appointments/{appointment_id}/discharge  

      The contents of the file have Lname|Fname|apt_time|type|phone_number|DOB

      Sample message

      MOUSE|MICKEY|2018-01-15T13:10:44.979-05:00|04/17/1988|1234567890

      Currently using static values which is hard coded, but I’d like the file to be read line by line when making the appointment via an API call.

      {DATA {{“hospital_id”:1234,”first_name”:”MOUSE”,”last_name”:”MICKY”,”apt_time”: “2018-01-11T13:10:44.979-05:00″,”type”:”walkin”,”phone_number”:”1234567890″,”dob”:”01/07/1939″}}}

      Any suggestions shall be appreciated.

      thanks,

      Chuck

    Viewing 2 reply threads
    • Author
      Replies
      • #85852
        Jim Kosloskey
        Participant

          Well it looks like the records of the file can be defined as a VRL.

          Then assuming common record terminators (like Line feed or Carriage Return) the Fileset Protocol can be defined to locate, open, and read the file.

          Each terminated line then would be made available to the engine.

          You did not say the format of the outbound message but you can use an Xlate to create the OB message assuming it is a definable format.

          As to the OB protocol, it sounds like this may be an http connection. Is that correct?

          Also what release of Cloverleaf are you running?

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #85853
          Charles Kageni
          Participant

            The OB is also set to PROTOCOL:fileset-local

            Cloverleaf 6.1 version

          • #85854
            Jim Kosloskey
            Participant

              Is the format of the OB file the same as the IB file?

              If not what is the desired format for the OB file?

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

          Viewing 2 reply threads
          • The forum ‘General’ is closed to new topics and replies.