Record Medical Surgery Notes with STONE Serial LCD Screen

Record Medical Surgery Notes project is first based on a private WeChat cloud development applet for surgeons.

Tencent provides 5GB of free cloud storage for WeChat cloud development applets, enough for the average user’s personal accounts needs, and cloud storage again has the feature of easy access anytime, anywhere, as long as there is wifi and traffic, pick up your phone, open WeChat, you can call your own applet to access, query and count your private data.

Through the time period query function provided in the applet, you can easily and quickly query the number of surgeries in a certain year or month. Through the comprehensive query and statistics function of the applet, you can input different “keywords” to count the number of surgeries in a certain hospital, a certain part of the stone, a certain technique of treating the stone, and other specific descriptions.

In the operating room, we would be better suited to use the STONE touch serial LCD screen, which provides a more secure and reliable display and control interface for medical devices. Record Medical Surgery Notes

If we want to enter these surgical contents in the operating room, the model and parameters of the surgical equipment are certainly easier to get, even from the system through sharing, more accurate, and save the secondary entry, of course, such a function needs to be planned in the pre-equipment, here I demonstrate this WeChat applet function through the STONE serial LCD screen (no database and cloud storage involved).

Readers interested can also Further through the Bluetooth pairing, to achieve the system and mobile phone data sharing, to complete the local data cloud storage, and cloud data download to the local, through the Bluetooth can also achieve mobile phone to STONE serial LCD screen control, and screen to mobile phone end of the feedback, etc.

The WeChat applet is based on JavaScript and the STONE serial LCD screen project is based on an Arduino ESP32 environment.

The STONE interface physician surgery note item record will be expanded as follows.

Description

  • HMI and control creation instructions
  • Interface Download
  • Hardware connection and command testing
  • debugging code
  • Appendix: Table of ASCII codes

1、serial LCD screen HMI and control creation instructions

As shown in Figure (2) the power on can be accessed by different buttons for surgery record – Figure (3), time period query – Figure (5), and comprehensive query function – Figure (7) respectively.

As in Figure (3), the surgery record interface first selects the surgery time: year, month, and day through the text_selector control selects the surgery site, then fills in the surgery location, key equipment used for the surgery, and the surgery description through the edit control, and clicks the save button when finished, the record success interface will pop up as in Figure (4).

Record medical procedure notes with STONE serial LCD Screen

Figure (2) Power-on function interface

Record medical procedure notes with STONE serial LCD Screen

Figure (3) Surgery record interface

Click the back button on the screen in Figure (4) to return to the function screen in Figure (2). If you select the time period query, you will enter the interface of Figure (5), here too, you can select the year, month, and day of the start date and end date of the query by text_selector control, and then click the red button to enter the query result display in Figure (6).

Record medical procedure notes with STONE serial LCD Screen

Figure (4) Record success screen

Record medical procedure notes with STONE serial LCD Screen

Figure (5) Time period query screen

Figure (6) will show how many procedures have been recorded in total for the specified time period and will show the contents of the first procedure recorded in the middle of the screen, clicking the Next button will show the contents of the second and third in turn. These contents are displayed through the ESP32 control table with the STONE serial LCD screen communication passed into the label control, HScroll_label scroll control. The year, month, day, and a total number of procedures are all label controls, and the others are HScroll_label controls that scroll to show more content. Click the Back button to return to the function screen in Figure (2). If you select the comprehensive query function in Figure (2), you go to the interface in Figure (7).

Record medical procedure notes with STONE serial LCD Screen

Figure (6) Time period query result screen

Record medical procedure notes with STONE serial LCD Screen

Figure (7) Integrated query function interface

In Figure (7) the keyword input is received via edit, click on the read button to enter the result screen in Figure (8), and click on the Back button to return to Figure (2).

In Figure (8), similar to Figure (6), the total number of surgeries matching the keyword is displayed, along with the Next button to display the contents of all surgeries. The Back button is also used to return to Figure (2).

The names and ranges of controls and contents of the various interfaces mentioned above that are involved in programming needs are displayed together in a unified manner for easy access during programming.

Record medical procedure notes with STONE serial LCD Screen

Figure (8) Integrated query result screen

Programming control name.

Surgery record screen save a button: name = b12

The surgical record contents text_selector, name are: year = ts11, month = ts12, day = ts13, part = ts14

Of which.

ts11 (2000 – 2099), ts12 (1 – 12) months, ts13 (1 – 31) days.

ts14 (1:left renal;2:right renal;3:left ureteral;4:right ureteral;5:bladder;6:urethral;7:others;)

The surgical record contents edit, name are.

Location = e11, Equipment = e12, Description = e13

Surgery time period query read button: name = b32

Start date: year = ts31, month = ts32, day = ts33

End date: year = ts34, month = ts35, day = ts36

Scope as above.

Time period query result Next button: name = b42

Labal displays the names as.

year = l41, month = l42, day = l43, total = l44

Hscroll label display name respectively.

Location = hl41, equipment = hl42, part = hl43, description = hl44, during = hl45

Keyword read button: name = b52, edit name = e51

Keyword query result Next button: name = b62

Labal displays the names as.

year = l61, month = l62, day = l63, total = l64

Hscroll label display name respectively.

Location = hl61, equipment = hl62, part = hl63, description = hl64, during = hl65

2、Interface Download

Refer to Method B of the Charging Post Project to download the interface successfully.

3. Hardware connection and command testing

Record medical procedure notes with STONE serial LCD Screen

Figure (9) Serial Assistant Command Test V1.2 adapter board jumper link diagram

The new version of STONE software is being continuously upgraded and improved, and some functions are found to be different from the manual during use, so it is necessary to verify the commands that need to be used before programming. Connect according to Figure (9) and check the feedback from STONE and verify the validity of the commands through the serial assistant.

The controls involved in this project are the button, label, HScroll_Label, edit, and text_selector a total of five, we test and verify them one by one below.

button related:

0x1001  button key-value actively sent down

Key-value (last byte of the data section):

0x01  press down button pressed

0x02  press up button release (button complete trigger click event)

Example:

The surgical record screen save button (name = b12 ) is pressed to actively issue the command.

ST<0x10 0x01 0x00 0x04 b12 0x01>ET

The serial assistant returns hexadecimal data:     Verify OK

53 54 3C 10 01 00 04 62 31 32 01 3E 45 54 5C 4F

Button release (complete button click action) Active command

ST<0x10 0x01 0x00 0x04 b12 0x02>ET

The serial assistant returns hexadecimal data:  Verify OK

53 54 3C 10 01 00 04 62 31 32 02 3E 45 54 18 4F

Note: Button b12 (ASCII code 0x62 0x31 0x32).

Label Related:

set_text  Set the text displayed by the label

Example:

Set text: (total number of keyword queries name = l64)

ST<{“cmd_code”: “set_text”, “type”: “label”, “widget”: “l64”, “text”: “520”}>ET Verify the top screen OK

hscroll_label related:

set_text  Set the text displayed by hscroll_label

Example:

Set the text:

ST<{“cmd_code”: “set_text”, “type”: “hscroll_label”, “widget”: “hl61”, “text”: “ShenZhen”}>ET NG

ST<{“cmd_code”: “set_text”, “type”: “label”, “widget”: “hl61”, “text”: “ShenZhen”}>ET OK

Note: NG is the command format given in the manual, OK is the command format I used to successfully try to get on the screen myself! That’s the big takeaway from the verification! Record Medical Surgery Notes

edit related:

get_text  Get the content displayed by edit

0x1070  edit text posting    (active-passive send can be active after edit data changes or active using get_text)

Text: “control name”:text content Data length cannot exceed 1024 bytes (text content after the : sign)

Example:

Get text: (edit control name = e11 at the location of the surgery record)

ST<{“cmd_code”: “get_text”, “type”: “edit”, “widget”: “e11”}>ET

The serial assistant feeds back hexadecimal data as follows.

53 54 3C 10 70 00 0C 22 65 31 31 22 3A 61 62 63 64 65 66 3E 45 54 20 FF

Edit the text data to send the command:  Verify OK

ST< 0x10 0x70 0x00 0x0C “e11”: abcdef >ET  e11 text data:abcdef

text selector related:

get_text  Gets the current text of the text selector

get_value  Gets the current value of the text selector

get_selected  Get the current selected item serial number of the text selector (gets the serial number of the current selected item)

0x1080  text selector text downlink    (passively sent MCU uses get_text to actively fetch)

0x1081  text selector value send  (int type Active/passive send: MCU use get_value command to get)

0x1082  text selector serial number is sent  (int type Passive: MCU uses get_selected command to get it)

Data format:

text text: “control name”:text content Length not exceeding 1024 bytes (text content after control name:number)

value value: the last four bytes of the data section

index value: the last four bytes of the data section

Example 1: (The site control name = ts14 for the procedure record, currently “1:left renal;” with a serial number of 0)

Get the current text of text selector t14:

ST<{“cmd_code”: “get_text”, “type”: “text_selector”, “widget”: “ts14”}>ET

The serial assistant feedback hexadecimal data is.

53 54 3C 10 80 00 11 22 74 73 31 34 22 3A 6C 65 66 74 20 72 65 6E 61 6C 3E 45 54 F1 FE

The instructions sent down the screen are.

ST< 0x10 0x80 0x00 0x11 “ts14”:left renal >ET     ts14 text data: left renal OK

Gets the current value of the text selector t14:

ST<{“cmd_code”: “get_value”, “type”: “text_selector”, “widget”: “ts14”}>ET

The serial assistant feedback hexadecimal data is.

53 54 3C 10 81 00 08 74 73 31 34 00 00 00 01 3E 45 54 DE CA  OK

The instructions sent down the screen are.

ST<0x10 0x81 0x00 0x08 ts14 0x00 0x00 0x00 0x00 0x01 >ET   ts14 current value data:1

Gets the current serial number of the text selector t14:

ST<{“cmd_code”: “get_selected”, “type”: “text_selector”, “widget”: “ts14”}>ET

The serial assistant feedback hexadecimal data is: (ts14 is “1:left renal;” with the serial number 0)

53 54 3C 10 82 00 08 74 73 31 34 00 00 00 00 3E 45 54 21 C8 OK

The instructions sent down the screen are.

ST<0x10 0x82 0x00 0x08 ts14 0x00 0x00 0x00 0x00 0x00 0x00 >ET  ts14 current serial number:0

Note: The options for ts14 are.

1:left renal;2:right renal;3:left ureteral;4:right ureteral;5:bladder;6:urethral;7:others;

*** This uses get_value to get the number in the format; and get_selected to get the serial number of the currently selected item (which starts at 0).

Example 2: (year control for surgery record name = ts11, options: 2000-2099, current: 2022)

Get the current text of text selector t11:

ST<{“cmd_code”: “get_text”, “type”: “text_selector”, “widget”: “ts11”}>ET

The serial assistant feedback hexadecimal data is: (ts11 is 2022)

53 54 3C 10 80 00 0B 22 74 73 31 31 22 3A 32 30 32 32 3E 45 54 D7 37

The instructions sent down the screen are.

ST< 0x10 0x80 0x00 0x0B “ts11”:2022 >ET ts11 current text: 2022 OK

Gets the current value of the text selector t11:

ST<{“cmd_code”: “get_value”, “type”: “text_selector”, “widget”: “ts11”}>ET

The serial assistant feedback hexadecimal data is.

53 54 3C 10 81 00 08 74 73 31 31 00 00 07 E6 3E 45 54 95 89             OK

The instructions sent down the screen are.

ST<0x10 0x81 0x00 0x08 ts11 0x00 0x00 0x07 0xE6 >ET   Current value of ts11:2022 = 7E6

Get the current serial number of the text selector t11:

ST<{“cmd_code”: “get_selected”, “type”: “text_selector”, “widget”: “ts11”}>ET

The serial assistant feedback hexadecimal data is: (0x16 = 22)

53 54 3C 10 82 00 08 74 73 31 31 00 00 00 16 3E 45 54 56 0C OK

The instructions sent down the screen are.

ST<0x10 0x82 0x00 0x08 ts11 0x00 0x00 0x00 0x00 0x16 >ET  ts11 current serial number: 0x16 = 22

With the above command tested, the next step is to program the surgeon’s record, query, and statistics functions with confidence. Of course, the first thing is still the hardware connection. We are using the ESP32 development board to implement the communication with the STONE serial screen.

As in Figure (10), NodeMCU-32S development board TX0, RX0, and GND is required and STONE screen adapter board corresponding connection, see Figure (11), in order to complete the HMI information interaction. STONE screen interface is 232 signals, through the V1.2 adapter board into the MCU interface needs to TX, RX signals, in order to level the match. Figure (11) shows the NodeMCU-32S board on the left, the blue (TX0) and red (RX0) wires are connected to the V1.2 adapter board jumper position (next to the removed blue jumper), and the black is connected to GND.

Record medical procedure notes with STONE serial LCD Screen

Figure (10) TX0 and RX0 location diagram of NodeMCU-32S development board

Record medical procedure notes with STONE serial LCD Screen

Figure (11) NodeMCU-32S development board and V1.2 adapter board communication connection diagram

4、Debug code

For reasons of space, this project focuses on button decoding and query and statistics programming. About the input of records or data sharing before system planning, or the import of Bluetooth for mobile phones, the details of decoding will not be done here. The program code below the collection has been verified, and please refer to the video for operational effects. Record Medical Surgery Notes

/*
  Frank for Doctor T in 2022.05.01
  use ESP32 of NodeMCU-32s in arduino 1.8.13
  use STONE HMI in shenzhen
*/
//------Doctor T use----------2022.05.01------
int iSave = 0; // 1 = save key is true, 0 = save key is false.
int iReadTime = 0; // 1 = read time find is true, 0 = false.
int iNextTime = 0; // 1 = read time next is true, 0 = false.
int iReadWord = 0; // 1 = read word find is true, 0 = false.
int iNextWord = 0; // 1 = read word next is true, 0 = false.
int yearStart,monthStart,dayStart,yearEnd,monthEnd,dayEnd; //int (-32768,32767) unsigned int(0,65535)
String iwordIn,iwordBuf; // note: S is big of s.
int years[10],months[10],days[10];
String locations[10],equipments[10],parts[10],descriptions[10];
int totalTime,totalWord;
int iNumRecord = 0; // record num!
int nowNumWord = -1; //
int nowNumTime = -1; //
int i3;
int LED_blue = 2; // IO2, turn the LED on (HIGH is the voltage level)
int ii = 0;
int iii = 0;
//------------
unsigned int time_1s=0;
unsigned int time_1m=0;
unsigned int time_1h=0;
void setup() {
  Serial.begin(115200);
  pinMode(LED_blue, OUTPUT);
}
void loop() {
  
  int inChar;
    
  // Read the information sent by the serial port and simply decode it:  
  if (Serial.available() > 0) {inChar = Serial.read();}        
  if (inChar == 0x62)
  {
    if (Serial.available() > 0){inChar = Serial.read();}
    if (inChar == 0x31) {
       if (Serial.available() > 0){ inChar = Serial.read();}
       if (inChar == 0x32)
       {
         if (Serial.available() > 0){ inChar = Serial.read();}
         if (inChar == 0x02)
         {
              iSave = 1; //62 31 32 02 is save key ok!
              iReadWord = 0;  
              iReadTime = 0;  
              iNextWord = 0;
              iNextTime = 0;  
         }
       }
    } else if (inChar == 0x33)
    {
       if (Serial.available() > 0){ inChar = Serial.read();}
       if (inChar == 0x32)
       {
         if (Serial.available() > 0){ inChar = Serial.read();}
         if (inChar == 0x02)
         {
             iReadWord = 0;
             iReadTime = 1; //62 33 32 02 is time read key ok!
             iNextWord = 0;
             iNextTime = 0;
             i3 = 0;
             totalTime = 0;
             nowNumTime = 0;  
         }
       }
    } else if (inChar == 0x34)
    {
       if (Serial.available() > 0){ inChar = Serial.read();}
       if (inChar == 0x32)
       {
          if (Serial.available() > 0){ inChar = Serial.read();}
          if (inChar == 0x02)
          {
              iNextWord = 0;
              iNextTime = 1; //62 34 32 02 is time Next key ok!
          }
       }
    } else if (inChar == 0x35)
    {
       if (Serial.available() > 0){ inChar = Serial.read();}
       if (inChar == 0x32)
       {
           if (Serial.available() > 0){ inChar = Serial.read();}
           if (inChar == 0x02)
           {
              iReadWord = 1; //62 35 32 02 is word read key ok!
              iReadTime = 0;  
              iNextWord = 0;
              iNextTime = 0;  
              i3 = 0;
              totalWord = 0;
              nowNumWord = 0;
           }
       }
    } else if (inChar == 0x36)
    {
       if (Serial.available() > 0){ inChar = Serial.read();}
       if (inChar == 0x32)
       {
         if (Serial.available() > 0){ inChar = Serial.read();}
         if (inChar == 0x02)
         {
             iNextWord = 1; //62 36 32 02 is word find Next key ok!
             iNextTime = 0;  
         }
       }
    }
  }
//-------------test------begin----------------
    years[0]=2021;
    months[0]=1;
    days[0]=1;
    locations[0]="ShenZhen PinLe";
    equipments[0]="holmic laser light";
    parts[0]="left renal";
    descriptions[0]="0.6cm";
    years[1]=2021;
    months[1]=2;
    days[1]=2;
    locations[1]="ShenZhen PinLe";
    equipments[1]="holmic laser light";
    parts[1]="right renal";
    descriptions[1]="0.8cm";
    iNumRecord = 2;
    yearStart = 2021;
    monthStart = 1;
    dayStart = 1;
    yearEnd = 2022;
    monthEnd = 5;
    dayEnd = 1;
    iwordIn = "left";
//-------------test-----end-----------------     
  if(iReadTime == 1) // the time find!  
  {
    iReadTime = 0;
    
    for(int i = 0; i < iNumRecord; i++) // look totalTime
    {
      if(yearEnd > years[i] && years[i] > yearStart){
        totalTime += 1;
        if(nowNumTime == -1){ nowNumTime = i; }
      }
      else if(yearEnd == years[i]){
        if(months[i] < monthEnd)
        {
          totalTime += 1;
          if(nowNumTime == -1){ nowNumTime = i; }
        }
        else if(months[i] == monthEnd && days[i] <= dayEnd)
        {
          totalTime += 1;
          if(nowNumTime == -1){ nowNumTime = i; }
        }
      }
      else if(years[i] == yearStart)
      {
        if(months[i] > monthStart){
          totalTime += 1;
          if(nowNumTime == -1){ nowNumTime = i; }
        }
        else if(months[i] == monthStart && days[i] >= dayStart){
          totalTime += 1;
          if(nowNumTime == -1){ nowNumTime = i; }
        }
      }
    }
    if(nowNumTime >= 0)
    {
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l41\",\"text\":\"");
          Serial.print(years[nowNumTime]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l42\",\"text\":\"");
          Serial.print(months[nowNumTime]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l43\",\"text\":\"");
          Serial.print(days[nowNumTime]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l44\",\"text\":\"");
          Serial.print(totalTime);
          Serial.println("\"}>ET");       
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl41\",\"text\":\"");   
          Serial.print(locations[nowNumTime]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl42\",\"text\":\"");   
          Serial.print(equipments[nowNumTime]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl43\",\"text\":\"");   
          Serial.print(parts[nowNumTime]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl44\",\"text\":\"");   
          Serial.print(descriptions[nowNumTime]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl45\",\"text\":\"");   
          Serial.print(String(yearStart)+"." +String(monthStart)+"." +String(dayStart)+"--"+String(yearEnd)+"." +String(monthEnd)+"." +String(dayEnd));
          Serial.println("\"}>ET");                    
    }
  }
  if(iNextTime == 1 && nowNumTime >= 0 )
  {
    int i4 = nowNumTime + 1;
    iNextTime = 0;  
      
    for(int i = i4; i < iNumRecord; i++) // look Next
    {
      if(yearEnd > years[i] && years[i] > yearStart){
        
          if(nowNumTime < i4){ nowNumTime = i; }
      }
      else if(yearEnd == years[i]){
        if(months[i] < monthEnd)
        {
          if(nowNumTime < i4){ nowNumTime = i; }
        }
        else if(months[i] == monthEnd && days[i] <= dayEnd)
        {
          
          if(nowNumTime < i4){ nowNumTime = i; }
        }
      }
      else if(years[i] == yearStart)
      {
        if(months[i] > monthStart){
          
          if(nowNumTime < i4){ nowNumTime = i; }
        }
        else if(months[i] == monthStart && days[i] >= dayStart){
          
          if(nowNumTime < i4){ nowNumTime = i; }
        }
      }
    }
    if(nowNumTime >= i4)
    {
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l41\",\"text\":\"");
          Serial.print(years[nowNumTime]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l42\",\"text\":\"");
          Serial.print(months[nowNumTime]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l43\",\"text\":\"");
          Serial.print(days[nowNumTime]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l44\",\"text\":\"");
          Serial.print(totalTime);
          Serial.println("\"}>ET");       
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl41\",\"text\":\"");   
          Serial.print(locations[nowNumTime]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl42\",\"text\":\"");   
          Serial.print(equipments[nowNumTime]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl43\",\"text\":\"");   
          Serial.print(parts[nowNumTime]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl44\",\"text\":\"");   
          Serial.print(descriptions[nowNumTime]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl45\",\"text\":\"");   
          Serial.print(String(yearStart)+"." +String(monthStart)+"." +String(dayStart)+"--"+String(yearEnd)+"." +String(monthEnd)+"." +String(dayEnd));
          Serial.println("\"}>ET");     
    }
  }
  if(iReadWord == 1) // the word find!
  {
    iReadWord = 0;
    
    for(int i = 0; i < iNumRecord; i++) // look totalWord
    {
      if(locations[i].indexOf(iwordIn) >= 0 || equipments[i].indexOf(iwordIn) >= 0 )
      {
        totalWord += 1;
        if(nowNumWord == -1){ nowNumWord = i; }
      } else if(parts[i].indexOf(iwordIn) >= 0 || descriptions[i].indexOf(iwordIn) >= 0)
      {
          totalWord += 1;
          if(nowNumWord == -1){ nowNumWord = i; }
      }
    }
    if(nowNumWord >= 0)
    {
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l61\",\"text\":\"");
          Serial.print(years[nowNumWord]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l62\",\"text\":\"");
          Serial.print(months[nowNumWord]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l63\",\"text\":\"");
          Serial.print(days[nowNumWord]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l64\",\"text\":\"");
          Serial.print(totalWord);
          Serial.println("\"}>ET");       
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl61\",\"text\":\"");   
          Serial.print(locations[nowNumWord]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl62\",\"text\":\"");   
          Serial.print(equipments[nowNumWord]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl63\",\"text\":\"");   
          Serial.print(parts[nowNumWord]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl64\",\"text\":\"");   
          Serial.print(descriptions[nowNumWord]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl65\",\"text\":\"");   
          Serial.print(iwordIn);
          Serial.println("\"}>ET");                    
    }
  }
  if(iNextWord == 1 && nowNumWord >= 0 )
  {
    int i5 = nowNumWord + 1;
    iNextWord = 0;  
      
    for(int i = i5; i < iNumRecord; i++) // look Next
    {
      if(locations[i].indexOf(iwordIn) >= 0 || equipments[i].indexOf(iwordIn) >= 0 ){
        
          if(nowNumWord < i5){ nowNumWord = i; }
      }
      else if(parts[i].indexOf(iwordIn) >= 0 || descriptions[i].indexOf(iwordIn) >= 0)
      {
        if(nowNumWord < i5){ nowNumWord = i; }
      }
    }
    if(nowNumWord >= i5)
    {
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l61\",\"text\":\"");
          Serial.print(years[nowNumWord]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l62\",\"text\":\"");
          Serial.print(months[nowNumWord]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l63\",\"text\":\"");
          Serial.print(days[nowNumWord]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"l64\",\"text\":\"");
          Serial.print(totalWord);
          Serial.println("\"}>ET");       
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl61\",\"text\":\"");   
          Serial.print(locations[nowNumWord]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl62\",\"text\":\"");   
          Serial.print(equipments[nowNumWord]);
          Serial.println("\"}>ET");   
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl63\",\"text\":\"");   
          Serial.print(parts[nowNumWord]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl64\",\"text\":\"");   
          Serial.print(descriptions[nowNumWord]);
          Serial.println("\"}>ET");
          Serial.print("ST<{\"cmd_code\":\"set_text\",\"type\":\"label\",\"widget\":\"hl65\",\"text\":\"");   
          Serial.print(iwordIn);
          Serial.println("\"}>ET");        
    }
  }
  
    //--time ++ ------
  ii = ii + 1;
  if(ii > 29){
    time_1s = time_1s + 1;  
    ii = 0;
    if(iii == 0){
          digitalWrite(LED_blue, HIGH);  
          iii = 1;
    }else{
      iii = 0;
        digitalWrite(LED_blue, LOW);     
    }
  }
  if(time_1s >= 60){
    time_1s = 0;
    time_1m = time_1m + 1;
    if(time_1m >= 60){
      time_1m = 0;
      time_1h = time_1h + 1;
    }
  }
  delay(10);   
}
Query Description.
The combined query's include keyword determines the use of the String object's indexOf() method (the position of a string within another string!)
Syntax: string.indexOf(val)
 string.indexOf(val, from)
Parameters: string:  A variable of type String
 val:  the value to search for - char or String
 from:  the index to start the search from
Return value: the position in which, otherwise -1
Example:
  stringOne = "<HTML><HEAD><BODY>";
  int bodyTag = stringOne.indexOf("<BODY>");

Record Medical Surgery Notes

If you encounter any problems in the development, please leave a message in our forum for consultation

https://forum.stoneitech.com/

Shopping Cart
Scroll to Top