patch on observation valueString
# support
c
Hi @finnbergquist @rahul1 we are facing trouble trying to use PATCH on a Observation valueString .
Copy code
const response = await medplum.patchResource(
    'Observation',
    '12345',
    [
      {
        op: 'add',
        path: '/value',
        value: 'test',
      },
    ]
  );
this is what we are currently trying to do , we get a success response but doesn't seem to make the changes on the resource . what we actually need is to patch multiple observations using a batch operation . regards, Charith V
r
@charithv , I believe the right
path
here would be to use
/valueString
c
Hi Rahul , this works thanks . we were a little confused with the syntax for bundle request where we need to
JSON.stringify
or enclose with a string for 'valueString' but overall it works .
Copy code
parameter: [
            {
              name: 'operation',
              part: [
                { name: 'op', valueCode: 'add' },
                { name: 'path', valueString: '/valueString' },
                {
                  name: 'value',
                  valueString: '"New updated 2"' << ,
                },
              ],
            },
          ],
overall it works , thanks for the help Rahul.
187 Views