ManualEntryForm
Renders numeric fields for a measurementTypeKey using the SDK's
measurementFieldCatalog required/minimum/maximum/unit definitions.
<ManualEntryForm
measurementTypeKey={MeasurementTypeKey.bodyWeight}
saveMeasurement={async (input) => queueOrSave(input)}
labelForField={(field) => fieldLabels[field] ?? field}
/>
Props
measurementTypeKey: MeasurementTypeKey— measurement fields to render.saveMeasurement: (input: ManualEntrySaveInput) => Promise<unknown>.initialValues?: Partial<Record<string, number>>.recordedAt?: Date— defaults to the current time.title?: string.labelForField?: (field: string) => string.labelForUnit?: (unit: string) => string— formats the catalog unit label.onSaved?: (input: ManualEntrySaveInput) => void.testID?: string.theme?andslots?— sharedOvokUiProps.
The save input is:
interface ManualEntrySaveInput {
measurementTypeKey: MeasurementTypeKey;
data: Record<string, number>;
recordedAt: Date;
}
The app decides whether saving creates FHIR resources, queues offline work, or
calls another service. Validation messages and field labels are not a built-in
localization system. The urine measurement key is MeasurementTypeKey.uricAcid in
the current core API; it is the urine-analysis display name, but the field catalog
does not currently provide editable fields for that type, so ManualEntryForm renders
no analyte inputs for it. The form's Save button is disabled after saving begins,
but the save function itself has no re-entrancy guard; a very fast double tap can
still reach the host callback twice.