felicity-lims/webapp/graphql/patient.mutations.ts

76 lines
1.2 KiB
TypeScript
Raw Normal View History

import gql from 'graphql-tag';
2021-09-27 23:45:22 +08:00
export const ADD_PATIENT = gql`
2021-12-31 00:59:41 +08:00
mutation AddPatient($payload: PatientInputType!){
createPatient(payload: $payload) {
2021-12-30 04:46:14 +08:00
... on PatientType {
__typename
uid
clientPatientId
patientId
firstName
middleName
lastName
age
gender
dateOfBirth
ageDobEstimated
client {
name
district {
name
2021-12-30 04:46:14 +08:00
province {
name
}
}
2021-12-30 04:46:14 +08:00
}
phoneHome
phoneMobile
consentSms
}
... on OperationError {
__typename
error
suggestion
}
}
2021-12-23 16:56:49 +08:00
}`;
export const UPDATE_PATIENT = gql`
2023-03-19 23:21:32 +08:00
mutation EditPatient($uid: FelicityID!,$payload: PatientInputType!){
2021-12-31 00:59:41 +08:00
updatePatient(uid: $uid, payload: $payload) {
2021-12-30 04:46:14 +08:00
... on PatientType {
__typename
uid
clientPatientId
patientId
firstName
middleName
lastName
age
gender
dateOfBirth
ageDobEstimated
client {
name
district {
2021-12-23 16:56:49 +08:00
name
2021-12-30 04:46:14 +08:00
province {
2021-12-23 16:56:49 +08:00
name
}
}
2021-12-30 04:46:14 +08:00
}
phoneHome
phoneMobile
consentSms
}
... on OperationError {
__typename
error
suggestion
}
2021-12-23 16:56:49 +08:00
}
}`;