Insert constraint issue
Assuming you are using a recent 12.10 Informix version, the online documentation states:


  As indicated in the INSERT statement syntax diagram, not all clauses
  and options of the SELECT statement are available for you to use in a
  query within an INSERT statement. The following SELECT clauses and
  options are not supported in an INSERT statement: 
  
  
  FIRST and LIMIT 
  INTO TEMP, INTO RAW, and INTO STANDARD result table options 
  UNION, UNION ALL, INTERSECT, MINUS, and EXCEPT set operators.
  


So FIRST is not supported in SELECT statements used in an INSERT context. But using FIRST in the query does not give any syntax error, so maybe something else is going on.

-- The setup
CREATE TABLE patnotes
(
     patkey    SERIAL
    , notetype CHAR(4)
    , order_no INTEGER
);

CREATE UNIQUE INDEX patnotes_udx1 ON patnotes(patkey, notetype, order_no);

INSERT INTO patnotes VALUES (5000, 'GEN', 1);
INSERT INTO patnotes VALUES (5000, 'GEN', 2);

CREATE TABLE person
(
      personkey INTEGER
    , patid     CHAR(4)
);

INSERT INTO person VALUES (4999, '4999');
INSERT INTO person VALUES (5000, '5000');
INSERT INTO person VALUES (5001, '5001');

-- The insert query
INSERT INTO patnotes (patkey, notetype, order_no)
SELECT FIRST 1 
    p.personkey
    , 'GEN' AS notetype
    , CASE 
        WHEN n.order_no IS NULL THEN 1 
        ELSE (n.order_no + 1) 
      END AS order_no
FROM 
    person p 
LEFT JOIN 
    patnotes n 
    ON p.personkey = n.patkey 
    AND n.notetype = 'GEN'
WHERE 
    p.patid = '5000'
ORDER BY 
    n.order_no DESC;


When we run the above INSERT we get:

239: Could not insert new row - duplicate value in a UNIQUE INDEX column (Unique Index:patnotes_udx1).
100: ISAM error:  duplicate value for a record with unique key.


If we remove the UNIQUE constraint and run the INSERT multiple times we keep getting the same value for column order_no .

-- remove the UNIQUE
DROP INDEX patnotes_udx1;

-- Run the insert multiple times and we get
SELECT * FROM patnotes;
patkey notetype    order_no

  5000 GEN                1
  5000 GEN                2
  5000 GEN                2
  5000 GEN                2
  5000 GEN                2
  5000 GEN                2
  5000 GEN                2
  5000 GEN                2
  5000 GEN                2
  5000 GEN                2


It keeps inserting the same calculated order_no . Seems like a bug. You should open a defect with Informix support. 

As a workaround you can use MAX to calculate order_no:

INSERT INTO patnotes (patkey, notetype, order_no)      
SELECT
    p.personkey
    , 'GEN' AS notetype
    , (MAX(NVL(n.order_no,0)) + 1) AS order_no
FROM
    person p
LEFT JOIN
    patnotes n
    ON p.personkey = n.patkey
    AND n.notetype = 'GEN'
WHERE
    p.patid = '5000'
GROUP BY
    p.personkey, notetype
;


Please do note that this approach will fail miserably if you have multiple sessions trying to insert new values concurrently. You should use SERIAL or create a SEQUENCE to generate the order_no values.