Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
This WS is designed to allow NHS employee with assigned appropriate scopes to get Legal Entity data.
Key points
This is a graphQl query method used in Administration panel only.
Only authenticated and authorized NHS employee with appropriate scope can get Legal Entity details.
Specification
"""
Legal Entity contains data about medical service providers, pharamcies and MISes.
In order to obtain details user must have a scope `legal_entity:read`.
NHS admin can verify Legal Entity having a scope `legal_entity:nhs_verify`.
Also it's possible to deactivate Legal Entity having a scope `legal_entity:deactivate`
"""
type LegalEntity implements Node {
"The ID of an object"
id: ID!
"Primary key identifier from the database"
databaseId: UUID!
"Full official name of legal entity also the name to show on public sources [as map, portal etc]"
name: String @deprecated(reason: "Use `name` from type `EDRData`.")
"Legal entity short name."
shortName: String @deprecated(reason: "Use `shortName` from type `EDRData`.")
"Legal entity public name."
publicName: String
@deprecated(reason: "Use `publicName` from type `EDRData`.")
"Business form."
legalForm: String @deprecated(reason: "Use `legalForm` from type `EDRData`.")
"Ukrainian Industry Classification System, there is a check that at least one of next kveds is input: 86.10, 86.21, 47.73."
kveds: [String] @deprecated(reason: "Use `kveds` from type `EDRData`.")
"Legal entity type. The value should be present in the `LEGAL_ENTITY_TYPE` dictionary."
type: String!
"A unique identification number of a legal entity in the State Register of Enterprises and Organizations of Ukraine."
edrpou: String! @fake(randexp: "^[0-9]{8,10}$")
"Legal entity status, is set automatically"
status: LegalEntityStatus!
"Reason why status was set"
statusReason: String
"Legal entity residence address."
residenceAddress: Address
"Legal entity addresses."
addresses: [Address]
@deprecated(
reason: "Use `residenceAddress` and `registrationAddress` from type `EDRData`."
)
"Legal entity phone number."
phones: [Phone]!
"email to contact person in charge from legal entity"
email: String! @fake(locale: "uk", method: "internet.email")
"Treasury registration code."
receiverFundsCode: String @fake(randexp: "^[0-9]{14}$")
"Dictionary OWNER_PROPERTY_TYPE State or private type of legal entity"
ownerPropertyType: String @deprecated(reason: "No longer supported")
"Reads through a set of associated `LegalEntityLicense`."
licenses(
"A condition to be used in determining which values should be returned by the collection."
filter: LegalEntityLicenseFilter
"The method to use when ordering collection items."
orderBy: LegalEntityLicenseOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): LegalEntityLicenseConnection!
"Accreditation of legal entity."
accreditations: [LegalEntityAccreditation]
"In case legal entity is verified by MIS, misVerified = true"
misVerified: LegalEntityMisVerificationStatus!
"Change requests for this `LegalEntity` in order to verify it."
nhsComment: String @fake(locale: "uk", method: "lorem.sentenses")
"Whether this `LegalEntity` was reviewed or not?"
nhsReviewed: Boolean
"Whether this `LegalEntity` was verified by NHS or not?"
nhsVerified: Boolean
"Date and time when `LegalEntity` has lost NHS verification."
nhsUnverifiedAt: DateTime
"legal entity website"
website: String @fake(locale: "uk", method: "internet.url")
"legal owner of legal entity [нформація про власника ЗОЗ, для ФОП не заповнюється]"
beneficiary: String
@fake(locale: "uk", format: "{{name.findName}} {{name.jobTitle}}")
"Legal entity archive information, date and place"
archives: [LegalEntityArchive]
"System information: date and time when legal entity was inserted to DB."
insertedAt: DateTime!
"First employee with employee_type='OWNER ordered by UPDATED_AT_DESC"
owner: Employee!
"Whether the legal entity is present in a unified state register or not?"
edrVerified: Boolean
"Data that are synchronised with governmental legal entity database"
edrData: EDRData
"Employees wich belong to legal entity"
employees(
"A condition to be used in determining which values should be returned by the collection."
filter: EmployeeFilter
"The method to use when ordering collection items."
orderBy: EmployeeOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): EmployeeConnection!
"Divisions within this legal entity."
divisions(
"A condition to be used in determining which values should be returned by the collection."
filter: DivisionFilter
"The method to use when ordering collection items."
orderBy: DivisionOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): DivisionConnection!
"Main/Active legal entity after merging legal entities."
mergedToLegalEntity: RelatedLegalEntity
"Legal entities that are not active anymore and that were merged to this one."
mergedFromLegalEntities(
"A condition to be used in determining which values should be returned by the collection."
filter: RelatedLegalEntityFilter
"The method to use when ordering collection items."
orderBy: RelatedLegalEntityOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): RelatedLegalEntityConnection!
"Reads and enables pagination through a set of `Healthcare service`."
healthcareServices(
"A condition to be used in determining which values should be returned by the collection."
filter: HealthcareServiceFilter
"The method to use when ordering collection items."
orderBy: HealthcareServiceOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): HealthcareServiceConnection!
}
Authorize
Verify the validity of access token
Return 401 in case validation fails
Verify that token is not expired
in case of error - return (401, 'Invalid access token')
Check user scopes
`legal_entity:read` in order to search person
In case of invalid scope, return: "You don't have permission to access this resource“
Validate request
Validate query params
Parameters that could be sent to prm from admin search:
Service logic
Get data from prm DB
legal_entity
edr_data by legal_entity.edr_data
employee by legal_entity.id where employee.type = owner
division by legal_entity.id
licenses by legal_entity.id
merged_to_legal_entity where legal_entity.id = related_legal_entity.merged_to_legal_entity