public with sharing class lexAccountController {
    @AuraEnabled
    public static InitData initForNewSolutonProButton(String recordId){
        InitData res = new InitData();
        try {
            Account acc = [
                select
                Id, 
                Hospital__r.Salesdepartment_HP__c,
                Hospital__r.Id, 
                Hospital__r.OCM_Category__c
                from Account where Id =: recordId
            ];
            res.hospitalSalesdepartmentHP = acc.Hospital__r.Salesdepartment_HP__c;
            res.hospitalId = acc.Hospital__r.Id;
            res.hospitalOCMCategory = acc.Hospital__r.OCM_Category__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    class InitData{
        @AuraEnabled
        public String hospitalSalesdepartmentHP;
        @AuraEnabled
        public String hospitalId;
        @AuraEnabled
        public String hospitalOCMCategory;
    }
}