Export class instances to a string (for sharing, backup) and importing them
I don't see a question here, but I think I understand your concerns...

Regarding performance - I don't think you need to worry. Note that JSON and XML exist, in part, as formats for transmitting objects between apps in a platform independent way and there isn't a whole lot of worries about performance with either of them.

That said, I suggest you use one of these standard data interchange formats rather than trying to invent your own. Both JSON and XML already have very efficient and OS provided functions for doing the conversion...

extension Patient {
    init(dictionary dict: [String: AnyObject]) {
        id = dict["id"] as! String
        name = dict["name"] as! String
        age = dict["age"] as! Int
        // etc...
    }

    var dictionary: [String: AnyObject] {
        var dict: [String: AnyObject] = [:]
        dict["id"] = id
        dict["name"] = name
        dict["age"] = age
        // etc...
        return dict
    }
}


Once you have the above, you can easily convert a Patient to and from a Dictionary object and once you have that, you can use Apple's methods to convert the dictionary to/from either JSON or XML depending on what you like best.

You might also want to consider using SwiftyJSON instead of [String: AnyObject] dictionaries.